diff options
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 249dad987a16..ded469ff08b3 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
@@ -854,6 +854,8 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
854 | resp->cstate.replay_owner = NULL; | 854 | resp->cstate.replay_owner = NULL; |
855 | fh_init(&resp->cstate.current_fh, NFS4_FHSIZE); | 855 | fh_init(&resp->cstate.current_fh, NFS4_FHSIZE); |
856 | fh_init(&resp->cstate.save_fh, NFS4_FHSIZE); | 856 | fh_init(&resp->cstate.save_fh, NFS4_FHSIZE); |
857 | /* Use the deferral mechanism only for NFSv4.0 compounds */ | ||
858 | rqstp->rq_usedeferral = (args->minorversion == 0); | ||
857 | 859 | ||
858 | /* | 860 | /* |
859 | * According to RFC3010, this takes precedence over all other errors. | 861 | * According to RFC3010, this takes precedence over all other errors. |
@@ -933,12 +935,18 @@ encode_op: | |||
933 | 935 | ||
934 | nfsd4_increment_op_stats(op->opnum); | 936 | nfsd4_increment_op_stats(op->opnum); |
935 | } | 937 | } |
938 | if (!rqstp->rq_usedeferral && status == nfserr_dropit) { | ||
939 | dprintk("%s Dropit - send NFS4ERR_DELAY\n", __func__); | ||
940 | status = nfserr_jukebox; | ||
941 | } | ||
936 | 942 | ||
937 | fh_put(&resp->cstate.current_fh); | 943 | fh_put(&resp->cstate.current_fh); |
938 | fh_put(&resp->cstate.save_fh); | 944 | fh_put(&resp->cstate.save_fh); |
939 | BUG_ON(resp->cstate.replay_owner); | 945 | BUG_ON(resp->cstate.replay_owner); |
940 | out: | 946 | out: |
941 | nfsd4_release_compoundargs(args); | 947 | nfsd4_release_compoundargs(args); |
948 | /* Reset deferral mechanism for RPC deferrals */ | ||
949 | rqstp->rq_usedeferral = 1; | ||
942 | dprintk("nfsv4 compound returned %d\n", ntohl(status)); | 950 | dprintk("nfsv4 compound returned %d\n", ntohl(status)); |
943 | return status; | 951 | return status; |
944 | } | 952 | } |