From: NeilBrown 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 Signed-off-by: J. Bruce Fields Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- 25-akpm/fs/nfsd/nfs4state.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff -puN fs/nfsd/nfs4state.c~nfsd4-fix-share-conflict-tests fs/nfsd/nfs4state.c --- 25/fs/nfsd/nfs4state.c~nfsd4-fix-share-conflict-tests 2005-03-21 22:49:48.000000000 -0800 +++ 25-akpm/fs/nfsd/nfs4state.c 2005-03-21 22:49:48.000000000 -0800 @@ -1535,14 +1535,12 @@ nfs4_check_open(struct nfs4_file *fp, st 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; _