Skip to content

Commit

Permalink
NFSv4.2: Add special handling for LISTXATTR receiving NFS4ERR_NOXATTR
Browse files Browse the repository at this point in the history
We can translate this into an empty response list instead of passing an
error up to userspace.

Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
amschuma-ntap committed Oct 5, 2022
1 parent a035618 commit 9636946
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fs/nfs/nfs42xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,14 @@ static int decode_listxattrs(struct xdr_stream *xdr,
*/
if (status == -ETOOSMALL)
status = -ERANGE;
/*
* Special case: for LISTXATTRS, NFS4ERR_NOXATTR
* should be translated to success with zero-length reply.
*/
if (status == -ENODATA) {
res->eof = true;
status = 0;
}
goto out;
}

Expand Down

0 comments on commit 9636946

Please sign in to comment.