summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-11-17 23:14:40 +0100
committerChuck Lever <chuck.lever@oracle.com>2024-01-07 23:54:25 +0100
commita2c91753a4f3771a9b46eb42e0c46654819149a4 (patch)
tree8f8729bcc3c7bc4a7add72b9a6b15ac604235e76 /fs/nfsd/nfs4proc.c
parentNFSD: Replace RQ_SPLICE_OK in nfsd_read() (diff)
downloadlinux-a2c91753a4f3771a9b46eb42e0c46654819149a4.tar.xz
linux-a2c91753a4f3771a9b46eb42e0c46654819149a4.zip
NFSD: Modify NFSv4 to use nfsd_read_splice_ok()
Avoid the use of an atomic bitop, and prepare for adding a run-time switch for using splice reads. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 6f2d4aa4970d..14712fa08f76 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -970,8 +970,11 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
* 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))
- clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags);
+ if (!nfsd4_last_compound_op(rqstp)) {
+ struct nfsd4_compoundargs *argp = rqstp->rq_argp;
+
+ argp->splice_ok = false;
+ }
/* check stateid */
status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh,