diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-29 23:55:59 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-29 23:55:59 +0200 |
commit | b01e86fee6c821e4e003fd4e9f65453ac478a58e (patch) | |
tree | 21695e10cbe7001d2ccc8c87cee5e7a7865b1025 /mm | |
parent | Rename libata-bmdma.c to libata-sff.c. (diff) | |
parent | Linux v2.6.18-rc5 (diff) | |
download | linux-b01e86fee6c821e4e003fd4e9f65453ac478a58e.tar.xz linux-b01e86fee6c821e4e003fd4e9f65453ac478a58e.zip |
Merge /spare/repo/linux-2.6 into upstream
Diffstat (limited to 'mm')
-rw-r--r-- | mm/swapfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index e70d6c6d6fee..f1f5ec783781 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -442,11 +442,12 @@ int swap_type_of(dev_t device) if (!(swap_info[i].flags & SWP_WRITEOK)) continue; + if (!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); |