NFSD: Replace RQ_SPLICE_OK in nfsd_read()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 17 Nov 2023 22:14:33 +0000 (17:14 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 7 Jan 2024 22:54:25 +0000 (17:54 -0500)
commitc21fd7a8e86c0e069b512462ffd69bcf179387c8
treeda4b072de2d33d6dd110ce336f4c023b5b7e0bce
parentdeb704281f076097b0347116a82edeba96697db1
NFSD: Replace RQ_SPLICE_OK in nfsd_read()

RQ_SPLICE_OK is a bit of a layering violation. Also, a subsequent
patch is going to provide a mechanism for always disabling splice
reads.

Splicing is an issue only for NFS READs, so refactor nfsd_read() to
check the auth type directly instead of relying on an rq_flag
setting.

The new helper will be added into the NFSv4 read path in a
subsequent patch.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/vfs.c
fs/nfsd/vfs.h