diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-08-29 17:55:59 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-08-29 17:55:59 -0400 |
commit | b01e86fee6c821e4e003fd4e9f65453ac478a58e (patch) | |
tree | 21695e10cbe7001d2ccc8c87cee5e7a7865b1025 /mm/swapfile.c | |
parent | e889173c2c67dc288e9b050ab066cfae151b047e (diff) | |
parent | 60d4684068ff1eec78f55b5888d0bd2d4cca1520 (diff) |
Merge /spare/repo/linux-2.6 into upstream
Diffstat (limited to 'mm/swapfile.c')
-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) | |||
442 | 442 | ||
443 | if (!(swap_info[i].flags & SWP_WRITEOK)) | 443 | if (!(swap_info[i].flags & SWP_WRITEOK)) |
444 | continue; | 444 | continue; |
445 | |||
445 | if (!device) { | 446 | if (!device) { |
446 | spin_unlock(&swap_lock); | 447 | spin_unlock(&swap_lock); |
447 | return i; | 448 | return i; |
448 | } | 449 | } |
449 | inode = swap_info->swap_file->f_dentry->d_inode; | 450 | inode = swap_info[i].swap_file->f_dentry->d_inode; |
450 | if (S_ISBLK(inode->i_mode) && | 451 | if (S_ISBLK(inode->i_mode) && |
451 | device == MKDEV(imajor(inode), iminor(inode))) { | 452 | device == MKDEV(imajor(inode), iminor(inode))) { |
452 | spin_unlock(&swap_lock); | 453 | spin_unlock(&swap_lock); |