summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2014-06-13 09:32:42 (GMT)
committerJ. Bruce Fields <bfields@redhat.com>2014-06-17 20:42:48 (GMT)
commitf41c5ad2ff2657978a9712b9ea80cd812a7da2b0 (patch)
treef717adf1cef517c6a6fef4b1a321b5cea82d38b8 /fs/nfsd
parent6282cd56555347c0ec2addc97bd96b40df0a38b7 (diff)
downloadlinux-f41c5ad2ff2657978a9712b9ea80cd812a7da2b0.tar.xz
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 <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 2d305a1..83baf2b 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -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:
/*