public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] afs: build fix
@ 2007-07-19 16:56 Ingo Molnar
  2007-07-19 17:04 ` David Howells
  0 siblings, 1 reply; 2+ messages in thread
From: Ingo Molnar @ 2007-07-19 16:56 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Andrew Morton, David Howells

Subject: afs: build fix
From: Ingo Molnar <mingo@elte.hu>

this fresh commit:

 commit e8d6c554126b830217c5e9f549e0e21f865a0a8a
 Author: David Howells <dhowells@redhat.com>
 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 <bfields@citi.umich.edu>
 Date:   Fri May 11 16:09:32 2007 -0400

     locks: make posix_test_lock() interface more consistent

the fix is trivial.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 fs/afs/flock.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/fs/afs/flock.c
===================================================================
--- linux.orig/fs/afs/flock.c
+++ 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)

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

* Re: [patch] afs: build fix
  2007-07-19 16:56 [patch] afs: build fix Ingo Molnar
@ 2007-07-19 17:04 ` David Howells
  0 siblings, 0 replies; 2+ messages in thread
From: David Howells @ 2007-07-19 17:04 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Linus Torvalds, linux-kernel, Andrew Morton

Ingo Molnar <mingo@elte.hu> wrote:

> -	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

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

end of thread, other threads:[~2007-07-19 17:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-19 16:56 [patch] afs: build fix Ingo Molnar
2007-07-19 17:04 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox