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

Commit f41c5ad2 authored by Kinglong Mee's avatar Kinglong Mee Committed by J. Bruce Fields
Browse files

NFSD: fix bug for readdir of pseudofs



Commit 561f0ed4 (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: default avatarKinglong Mee <kinglongmee@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 6282cd56
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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:
		/*