Skip to content

Commit

Permalink
NFSD: Return nfserr_serverfault if splice_ok but buf->pages have data
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/linux-nfs/[email protected]/T/#t
Signed-off-by: Chuck Lever <[email protected]>
  • Loading branch information
amschuma-ntap authored and chucklever committed Sep 26, 2022
1 parent 5f5f8b6 commit 06981d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -3991,7 +3991,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, __be32 nfserr,
}
if (resp->xdr->buf->page_len && splice_ok) {
WARN_ON_ONCE(1);
return nfserr_resource;
return nfserr_serverfault;
}
xdr_commit_encode(xdr);

Expand Down

0 comments on commit 06981d5

Please sign in to comment.