summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-29 23:55:59 +0200
committerJeff Garzik <jeff@garzik.org>2006-08-29 23:55:59 +0200
commitb01e86fee6c821e4e003fd4e9f65453ac478a58e (patch)
tree21695e10cbe7001d2ccc8c87cee5e7a7865b1025 /mm
parentRename libata-bmdma.c to libata-sff.c. (diff)
parentLinux v2.6.18-rc5 (diff)
downloadlinux-b01e86fee6c821e4e003fd4e9f65453ac478a58e.tar.xz
linux-b01e86fee6c821e4e003fd4e9f65453ac478a58e.zip
Merge /spare/repo/linux-2.6 into upstream
Diffstat (limited to 'mm')
-rw-r--r--mm/swapfile.c3
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);