aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordavem <davem>2002-01-15 06:54:03 +0000
committerdavem <davem>2002-01-15 06:54:03 +0000
commit763ca12d9eb0c62b8c0a0efac225a4e862b56087 (patch)
tree0a608180a05cb94374dbf49b221d9155c7015c15
parent0b038362cf65275360ec8e9484a7db4aacdd4127 (diff)
downloadnetdev-vger-cvs-763ca12d9eb0c62b8c0a0efac225a4e862b56087.tar.gz
Fix filp_open error return check, by Al Viro.
-rw-r--r--mm/swapfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 2149e6eda..71d079f69 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -904,7 +904,7 @@ asmlinkage long sys_swapon(const char * specialfile, int swap_flags)
swap_file = filp_open(name, O_RDWR, 0);
putname(name);
error = PTR_ERR(swap_file);
- if (error)
+ if (IS_ERR(swap_file))
goto bad_swap_2;
p->swap_file = swap_file;