diff options
author | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2022-09-13 14:01:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-26 12:35:32 +0200 |
commit | 118dc74b2bc08dec271e0eb0c77fa637333e0fff (patch) | |
tree | 9dc0e29828788b45d745a5a4370ba6c8f150fa67 /fs | |
parent | 066b1302f2a9f07d268da73ef5557b886d4dee25 (diff) | |
download | linux-stable-118dc74b2bc08dec271e0eb0c77fa637333e0fff.tar.gz linux-stable-118dc74b2bc08dec271e0eb0c77fa637333e0fff.tar.bz2 linux-stable-118dc74b2bc08dec271e0eb0c77fa637333e0fff.zip |
NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
[ Upstream commit 06981d560606ac48d61e5f4fff6738b925c93173 ]
This was discussed with Chuck as part of this patch set. Returning
nfserr_resource was decided to not be the best error message here, and
he suggested changing to nfserr_serverfault instead.
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Link: https://lore.kernel.org/linux-nfs/20220907195259.926736-1-anna@kernel.org/T/#t
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index bda8478eb1ae..e0409f6cdfd5 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3988,7 +3988,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr, if (resp->xdr->buf->page_len && test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags)) { WARN_ON_ONCE(1); - return nfserr_resource; + return nfserr_serverfault; } xdr_commit_encode(xdr); |