[PATCH] nfsd4: fix check_for_locks
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 19 Jan 2006 01:43:22 +0000 (17:43 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 19 Jan 2006 03:20:25 +0000 (19:20 -0800)
Fix some bad logic.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/nfsd/nfs4state.c

index 3510e2ca40d2c2a6d15d11636100232024be22e4..e13d2233ff8c76be584d49d5a1e9b706dcee04d6 100644 (file)
@@ -2989,9 +2989,10 @@ check_for_locks(struct file *filp, struct nfs4_stateowner *lowner)
 
        lock_kernel();
        for (flpp = &inode->i_flock; *flpp != NULL; flpp = &(*flpp)->fl_next) {
-               if ((*flpp)->fl_owner == (fl_owner_t)lowner)
+               if ((*flpp)->fl_owner == (fl_owner_t)lowner) {
                        status = 1;
                        goto out;
+               }
        }
 out:
        unlock_kernel();