diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-07-07 20:59:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:24:09 -0400 |
commit | b700949b781480819e53bdc38a53f053226dd75e (patch) | |
tree | 1e09ac2b3e4c39e7167d4780f21ebaa416a1092a /fs/nfsd/nfs4state.c | |
parent | 444c2c07c2d7a6936d1381d381ab80e3f5541427 (diff) |
[PATCH] nfsd4: return better error on io incompatible with open mode
from RFC 3530:
"Share reservations are established by OPEN operations and by their
nature are mandatory in that when the OPEN denies READ or WRITE
operations, that denial results in such operations being rejected
with error NFS4ERR_LOCKED."
(Note that share_denied is really only a legal error for OPEN.)
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>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index b96714ae3dd7..3647c942915e 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1295,7 +1295,7 @@ nfs4_share_conflict(struct svc_fh *current_fh, unsigned int deny_type) | |||
1295 | fp = find_file(ino); | 1295 | fp = find_file(ino); |
1296 | if (!fp) | 1296 | if (!fp) |
1297 | return nfs_ok; | 1297 | return nfs_ok; |
1298 | ret = nfserr_share_denied; | 1298 | ret = nfserr_locked; |
1299 | /* Search for conflicting share reservations */ | 1299 | /* Search for conflicting share reservations */ |
1300 | list_for_each_entry(stp, &fp->fi_stateids, st_perfile) { | 1300 | list_for_each_entry(stp, &fp->fi_stateids, st_perfile) { |
1301 | if (test_bit(deny_type, &stp->st_deny_bmap) || | 1301 | if (test_bit(deny_type, &stp->st_deny_bmap) || |