fix suspend to disk swap_type_of() function
Subsystems (2)
PATCH 1/1 fix suspend to disk swap_type_of() function
The attached patch fixes swap_type_of() for the case the suspend device is not the first swap device. This looks like a cut'n'paste fix. Patch is against 2.6.17.8.
Signature · 1 line
Andreas Steinmetz SPAMmers use [email protected]
mm/swapfile.c +1 -1
@@ -444,7 +444,7 @@ int swap_type_of(dev_t device)spin_unlock (&swap_lock);return i; } - inode = swap_info->swap_file->f_dentry->d_inode; + inode = swap_info[i].swap_file->f_dentry->d_inode;if (S_ISBLK (inode->i_mode) && device ==MKDEV (imajor (inode),iminor (inode))) {spin_unlock (&swap_lock);