[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070719090620.GA14799@kernel.sg>
Date: Thu, 19 Jul 2007 17:06:20 +0800
From: Eugene Teo <eugeneteo@...nel.sg>
To: linux-kernel@...r.kernel.org
Cc: David Howells <dhowells@...hat.com>
Subject: [PATCH] fs/afs/flock.c: posix_test_lock() returns void
posix_test_lock() returns void, so there is no need to test the return value.
Checking fl->fl_type for F_UNLCK instead.
Signed-off-by: Eugene Teo <eugeneteo@...nel.sg>
---
fs/afs/flock.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/afs/flock.c b/fs/afs/flock.c
index 8f07f8d..4f77f3c 100644
--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -456,7 +456,8 @@ static int afs_do_getlk(struct file *file, struct file_lock *fl)
/* check local lock records first */
ret = 0;
- if (posix_test_lock(file, fl) == 0) {
+ posix_test_lock(file, fl);
+ if (fl->fl_type == F_UNLCK) {
/* no local locks; consult the server */
ret = afs_vnode_fetch_status(vnode, NULL, key);
if (ret < 0)
--
1.5.2.2
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists