linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] leases: fix a return-value mixup
@ 2008-04-23 20:28 David M. Richter
  2008-04-23 20:29 ` [PATCH 2/4] leases: when unlocking, skip locking-related steps David M. Richter
  0 siblings, 1 reply; 7+ messages in thread
From: David M. Richter @ 2008-04-23 20:28 UTC (permalink / raw)
  To: Bruce Fields; +Cc: linux-fsdevel, David M. Richter

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>
---
 fs/locks.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index 592faad..b9f3a0b 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;
-- 
1.5.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-04-24 20:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-23 20:28 [PATCH 1/4] leases: fix a return-value mixup David M. Richter
2008-04-23 20:29 ` [PATCH 2/4] leases: when unlocking, skip locking-related steps David M. Richter
2008-04-23 20:29   ` [PATCH 3/4] leases: move lock allocation earlier in generic_setlease() David M. Richter
2008-04-23 20:29     ` [PATCH 4/4] leases: remove unneeded variable from fcntl_setlease() David M. Richter
2008-04-23 22:52       ` J. Bruce Fields
2008-04-24 14:32   ` [PATCH 2/4] leases: when unlocking, skip locking-related steps Chuck Lever
2008-04-24 20:41     ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).