Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88523acd authored by Anna Schumaker's avatar Anna Schumaker Committed by Greg Kroah-Hartman
Browse files

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: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Link: https://lore.kernel.org/linux-nfs/20220907195259.926736-1-anna@kernel.org/T/#t


Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6904727d
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3594,7 +3594,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
	if (resp->xdr.buf->page_len &&
	if (resp->xdr.buf->page_len &&
	    test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags)) {
	    test_bit(RQ_SPLICE_OK, &resp->rqstp->rq_flags)) {
		WARN_ON_ONCE(1);
		WARN_ON_ONCE(1);
		return nfserr_resource;
		return nfserr_serverfault;
	}
	}
	xdr_commit_encode(xdr);
	xdr_commit_encode(xdr);