diff options
author | David M. Richter <richterd@citi.umich.edu> | 2008-04-23 16:28:59 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-04-25 12:58:22 -0400 |
commit | 5fcc60c3a05bf417229fba715e7aec52bf6717fb (patch) | |
tree | 6107e4db59f6394c4854e782e96e6343202df3af /fs/locks.c | |
parent | b69d3987f4360a5e7e9e55465b3cdd0cc204b79e (diff) | |
download | linux-5fcc60c3a05bf417229fba715e7aec52bf6717fb.tar.gz linux-5fcc60c3a05bf417229fba715e7aec52bf6717fb.tar.bz2 linux-5fcc60c3a05bf417229fba715e7aec52bf6717fb.zip |
leases: fix a return-value mixup
Fixes a return-value mixup from 85c59580b30c82aa771aa33b37217a6b6851bc14
"locks: Fix potential OOPS in generic_setlease()", in which -ENOMEM replaced
what had been intended to stay -EAGAIN in the variable "error".
Signed-off-by: David M. Richter <richterd@citi.umich.edu>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/locks.c b/fs/locks.c index 592faadbcec1..b9f3a0bed300 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -1404,6 +1404,7 @@ int generic_setlease(struct file *filp, long arg, struct file_lock **flp) rdlease_count++; } + error = -EAGAIN; if ((arg == F_RDLCK && (wrlease_count > 0)) || (arg == F_WRLCK && ((rdlease_count + wrlease_count) > 0))) goto out; |