Loading fs/nfsd/nfs4proc.c +11 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,17 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (read->rd_offset >= OFFSET_MAX) return nfserr_inval; /* * If we do a zero copy read, then a client will see read data * that reflects the state of the file *after* performing the * following compound. * * To ensure proper ordering, we therefore turn off zero copy if * the client wants us to do more in this compound: */ if (!nfsd4_last_compound_op(rqstp)) rqstp->rq_splice_ok = false; nfs4_lock_state(); /* check stateid */ if ((status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), Loading fs/nfsd/nfs4state.c +0 −8 Original line number Diff line number Diff line Loading @@ -1855,14 +1855,6 @@ out_free_session: goto out; } static bool nfsd4_last_compound_op(struct svc_rqst *rqstp) { struct nfsd4_compoundres *resp = rqstp->rq_resp; struct nfsd4_compoundargs *argp = rqstp->rq_argp; return argp->opcnt == resp->opcnt; } static __be32 nfsd4_map_bcts_dir(u32 *dir) { switch (*dir) { Loading fs/nfsd/xdr4.h +8 −0 Original line number Diff line number Diff line Loading @@ -528,6 +528,14 @@ static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp) || nfsd4_is_solo_sequence(resp); } static inline bool nfsd4_last_compound_op(struct svc_rqst *rqstp) { struct nfsd4_compoundres *resp = rqstp->rq_resp; struct nfsd4_compoundargs *argp = rqstp->rq_argp; return argp->opcnt == resp->opcnt; } #define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs) static inline void Loading Loading
fs/nfsd/nfs4proc.c +11 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,17 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, if (read->rd_offset >= OFFSET_MAX) return nfserr_inval; /* * If we do a zero copy read, then a client will see read data * that reflects the state of the file *after* performing the * following compound. * * To ensure proper ordering, we therefore turn off zero copy if * the client wants us to do more in this compound: */ if (!nfsd4_last_compound_op(rqstp)) rqstp->rq_splice_ok = false; nfs4_lock_state(); /* check stateid */ if ((status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), Loading
fs/nfsd/nfs4state.c +0 −8 Original line number Diff line number Diff line Loading @@ -1855,14 +1855,6 @@ out_free_session: goto out; } static bool nfsd4_last_compound_op(struct svc_rqst *rqstp) { struct nfsd4_compoundres *resp = rqstp->rq_resp; struct nfsd4_compoundargs *argp = rqstp->rq_argp; return argp->opcnt == resp->opcnt; } static __be32 nfsd4_map_bcts_dir(u32 *dir) { switch (*dir) { Loading
fs/nfsd/xdr4.h +8 −0 Original line number Diff line number Diff line Loading @@ -528,6 +528,14 @@ static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp) || nfsd4_is_solo_sequence(resp); } static inline bool nfsd4_last_compound_op(struct svc_rqst *rqstp) { struct nfsd4_compoundres *resp = rqstp->rq_resp; struct nfsd4_compoundargs *argp = rqstp->rq_argp; return argp->opcnt == resp->opcnt; } #define NFS4_SVC_XDRSIZE sizeof(struct nfsd4_compoundargs) static inline void Loading