Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 126220
b: refs/heads/master
c: 73fd874
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Jan 6, 2009
1 parent 3d125bd commit c9b0ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69beeb1d3428424fbc7546f85e5cd7ac4119c09d
refs/heads/master: 73fd8748ab0b9b3ddd178bea1d7ae03372033d96
6 changes: 3 additions & 3 deletions trunk/mm/swapfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
int nr_extents = 0;
sector_t span;
unsigned long maxpages = 1;
int swapfilesize;
unsigned long swapfilepages;
unsigned short *swap_map = NULL;
struct page *page = NULL;
struct inode *inode = NULL;
Expand Down Expand Up @@ -1539,7 +1539,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
goto bad_swap;
}

swapfilesize = i_size_read(inode) >> PAGE_SHIFT;
swapfilepages = i_size_read(inode) >> PAGE_SHIFT;

/*
* Read the swap header.
Expand Down Expand Up @@ -1616,7 +1616,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
error = -EINVAL;
if (!maxpages)
goto bad_swap;
if (swapfilesize && maxpages > swapfilesize) {
if (swapfilepages && maxpages > swapfilepages) {
printk(KERN_WARNING
"Swap area shorter than signature indicates\n");
goto bad_swap;
Expand Down

0 comments on commit c9b0ebc

Please sign in to comment.