diff options
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 725e56c362de..e2adc8eb9317 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1461,7 +1461,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1461 | int nr_extents = 0; | 1461 | int nr_extents = 0; |
1462 | sector_t span; | 1462 | sector_t span; |
1463 | unsigned long maxpages = 1; | 1463 | unsigned long maxpages = 1; |
1464 | int swapfilesize; | 1464 | unsigned long swapfilepages; |
1465 | unsigned short *swap_map = NULL; | 1465 | unsigned short *swap_map = NULL; |
1466 | struct page *page = NULL; | 1466 | struct page *page = NULL; |
1467 | struct inode *inode = NULL; | 1467 | struct inode *inode = NULL; |
@@ -1539,7 +1539,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1539 | goto bad_swap; | 1539 | goto bad_swap; |
1540 | } | 1540 | } |
1541 | 1541 | ||
1542 | swapfilesize = i_size_read(inode) >> PAGE_SHIFT; | 1542 | swapfilepages = i_size_read(inode) >> PAGE_SHIFT; |
1543 | 1543 | ||
1544 | /* | 1544 | /* |
1545 | * Read the swap header. | 1545 | * Read the swap header. |
@@ -1616,7 +1616,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1616 | error = -EINVAL; | 1616 | error = -EINVAL; |
1617 | if (!maxpages) | 1617 | if (!maxpages) |
1618 | goto bad_swap; | 1618 | goto bad_swap; |
1619 | if (swapfilesize && maxpages > swapfilesize) { | 1619 | if (swapfilepages && maxpages > swapfilepages) { |
1620 | printk(KERN_WARNING | 1620 | printk(KERN_WARNING |
1621 | "Swap area shorter than signature indicates\n"); | 1621 | "Swap area shorter than signature indicates\n"); |
1622 | goto bad_swap; | 1622 | goto bad_swap; |