Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Tue, 12 Sep 2006 19:49:05 +0200 | From | Andreas Steinmetz <> | Subject | [PATCH] 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. -- Andreas Steinmetz SPAMmers use robotrap@domdv.de --- linux.orig/mm/swapfile.c 2006-09-12 19:33:51.000000000 +0200 +++ linux/mm/swapfile.c 2006-09-12 19:34:58.000000000 +0200 @@ -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); | ![\](/images/icornerr.gif) |