ChangeSet 1.2308, 2005/03/31 08:58:03-08:00, [EMAIL PROTECTED]

        [PATCH] nfsd4: fix share conflict tests
        
        In nfs4_check_open():
        
        Move 'is_open_owner' check to be first.  Remove continue so as to call
        test_share on OPENs with a previously seen open_owner as per rfc3530.
        
        Signed-off-by: Andy Adamson <[EMAIL PROTECTED]>
        Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
        Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 nfs4state.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)


diff -Nru a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
--- a/fs/nfsd/nfs4state.c       2005-03-31 10:29:38 -08:00
+++ b/fs/nfsd/nfs4state.c       2005-03-31 10:29:38 -08:00
@@ -1535,14 +1535,12 @@
        int status = nfserr_share_denied;
 
        list_for_each_entry(local, &fp->fi_perfile, st_perfile) {
-               /* have we seen this open owner */
-               if (local->st_stateowner == sop) {
-                       *stpp = local;
-                       continue;
-               }
                /* ignore lock owners */
                if (local->st_stateowner->so_is_open_owner == 0)
                        continue;
+               /* remember if we have seen this open owner */
+               if (local->st_stateowner == sop)
+                       *stpp = local;
                /* check for conflicting share reservations */
                if (!test_share(local, open))
                        goto out;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to