aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-03-30 16:58:03 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-30 16:58:03 -0800
commit511f905214890b13964a4f730b8eecb0ba45b957 (patch)
treeddbbbb0201652325aa4b3f7c255aeab756552afc
parentb32f810ad9fd334b08e8efd027681cbdf75d3590 (diff)
downloadhistory-511f905214890b13964a4f730b8eecb0ba45b957.tar.gz
[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 <andros@citi.umich.edu> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/nfsd/nfs4state.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 945328d7c3a2a8..75a253ebe93038 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1535,14 +1535,12 @@ nfs4_check_open(struct nfs4_file *fp, struct nfs4_stateowner *sop, struct nfsd4_
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;