Skip to contentSkip to conversation

afs: build fix

PATCH In review Ingo Molnar 2 participants 2 messages Jul 19, 2007 Afs filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 afs: build fix

Subject: afs: build fix
From: Ingo Molnar <[email protected]>

this fresh commit:

commit e8d6c554126b830217c5e9f549e0e21f865a0a8a
Author: David Howells <[email protected]>
Date: Sun Jul 15 23:40:12 2007 -0700

AFS: implement file locking

Implement file locking for AFS.

did not even build (in an allyesconfig) because it forgot to take this recent commit into account:

commit 6d34ac199a4af5c678a3a8f3275aeb2586b72da3
Author: J. Bruce Fields <[email protected]>
Date: Fri May 11 16:09:32 2007 -0400

locks: make posix_test_lock() interface more consistent

the fix is trivial.

---
 fs/afs/flock.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/afs/flock.c +2 -1
Index: linux/fs/afs/flock.c
===================================================================
@@ -456,7 +456,8 @@ static int afs_do_getlk(struct file *fil
 
 	/* 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)
maintainer
#1 lore raw

fs/afs/flock.c static int afs_do_getlk(struct file *fil · line 460

Quoted 3 lines · Ingo Molnar
fs/afs/flock.c +2 -1
-	if (posix_test_lock(file, fl) == 0) {
+	posix_test_lock(file, fl);
+	if (fl->fl_type == F_UNLCK) {

Yep. Andrew Morton already has a patch of this form.

David