Skip to content

Commit

Permalink
NFSD: fix bug for readdir of pseudofs
Browse files Browse the repository at this point in the history
Commit 561f0ed (nfsd4: allow large readdirs) introduces a bug
about readdir the root of pseudofs.

Call xdr_truncate_encode() revert encoded name when skipping.

Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
  • Loading branch information
kinglongmee authored and J. Bruce Fields committed Jun 17, 2014
1 parent 6282cd5 commit f41c5ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfsd/nfs4xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2687,6 +2687,7 @@ nfsd4_encode_dirent(void *ccdv, const char *name, int namlen,
nfserr = nfserr_toosmall;
goto fail;
case nfserr_noent:
xdr_truncate_encode(xdr, start_offset);
goto skip_entry;
default:
/*
Expand Down

0 comments on commit f41c5ad

Please sign in to comment.