NFSD: fix bug for readdir of pseudofs
Subsystems (2)
PATCH 1/1 NFSD: fix bug for readdir of pseudofs
Commit 561f0ed498ca (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]>
--- fs/nfsd/nfs4xdr.c | 1 + 1 file changed, 1 insertion(+)
fs/nfsd/nfs4xdr.c +1 -0
@@ -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 :/*
Signature · 1 line
1.9.3
Quoted 4 lines · Kinglong Mee
Commit
561f0ed498ca(nfsd4: allow large readdirs) introduces a bug about readdir the root of pseudofs.Call
xdr_truncate_encode()revert encoded name when skipping.
Thanks for the fix! Applying for 3.16.
--b.
Quoted 21 lines
Signed-off-by Kinglong Mee <[email protected]>--- fs/nfsd/nfs4xdr.c | 1 + 1 file changed, 1 insertion(+)fs/nfsd/nfs4xdr.c +1
-0@@ -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 :/* Signature · 1 line
1.9.3