The patch titled

     nfsd4: return better error on io incompatible with open mode

has been added to the -mm tree.  Its filename is

     nfsd4-return-better-error-on-io-incompatible-with-open-mode.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

coverity-sunrpc-xprt-task-null-check.patch
nfsd4-reboot-recovery-fix.patch
nfsd4-fix-syncing-of-recovery-directory.patch
nfsd4-lookup_one_len-takes-i_sem.patch
nfsd4-prevent-multiple-unlinks-of-recovery-directories.patch
nfsd4-fix-release_lockowner.patch
nfsd4-err_grace-should-bump-seqid-on-open.patch
nfsd4-err_grace-should-bump-seqid-on-lock.patch
nfsd4-stop-overusing-reclaim_bad.patch
nfsd4-comment-indentation.patch
nfsd4-fix-open_reclaim-seqid.patch
nfsd4-seqid-comments.patch
nfsd4-relax-new-lock-seqid-check.patch
nfsd4-always-update-stateid-on-open.patch
nfsd4-return-better-error-on-io-incompatible-with-open-mode.patch
nfsd4-renew-lease-on-seqid-modifying-operations.patch
nfsd4-clarify-close_lru-handling.patch
nfsd4-clean-up-nfs4_preprocess_seqid_op.patch
nfsd4-check-lock-type-against-openmode.patch
nfsd4-fix-fh_expire_type.patch
xdr-input-validation.patch



From: NeilBrown <[EMAIL PROTECTED]>

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 <[EMAIL PROTECTED]>
Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 fs/nfsd/nfs4state.c       |    2 +-
 include/linux/nfsd/nfsd.h |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff -puN 
fs/nfsd/nfs4state.c~nfsd4-return-better-error-on-io-incompatible-with-open-mode 
fs/nfsd/nfs4state.c
--- 
25/fs/nfsd/nfs4state.c~nfsd4-return-better-error-on-io-incompatible-with-open-mode
  Wed Jul  6 13:09:10 2005
+++ 25-akpm/fs/nfsd/nfs4state.c Wed Jul  6 13:09:10 2005
@@ -1295,7 +1295,7 @@ nfs4_share_conflict(struct svc_fh *curre
        fp = find_file(ino);
        if (!fp)
                return nfs_ok;
-       ret = nfserr_share_denied;
+       ret = nfserr_locked;
        /* Search for conflicting share reservations */
        list_for_each_entry(stp, &fp->fi_stateids, st_perfile) {
                if (test_bit(deny_type, &stp->st_deny_bmap) ||
diff -puN 
include/linux/nfsd/nfsd.h~nfsd4-return-better-error-on-io-incompatible-with-open-mode
 include/linux/nfsd/nfsd.h
--- 
25/include/linux/nfsd/nfsd.h~nfsd4-return-better-error-on-io-incompatible-with-open-mode
    Wed Jul  6 13:09:10 2005
+++ 25-akpm/include/linux/nfsd/nfsd.h   Wed Jul  6 13:09:10 2005
@@ -231,6 +231,7 @@ void                nfsd_lockd_shutdown(void);
 #define        nfserr_reclaim_bad      __constant_htonl(NFSERR_RECLAIM_BAD)
 #define        nfserr_badname          __constant_htonl(NFSERR_BADNAME)
 #define        nfserr_cb_path_down     __constant_htonl(NFSERR_CB_PATH_DOWN)
+#define        nfserr_locked           __constant_htonl(NFSERR_LOCKED)
 
 /* error codes for internal use */
 /* if a request fails due to kmalloc failure, it gets dropped.
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to