* [PATCH] NFSD: fix bug for readdir of pseudofs
@ 2014-06-13 9:32 Kinglong Mee
2014-06-17 20:57 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Kinglong Mee @ 2014-06-13 9:32 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: Linux NFS Mailing List, kinglongmee
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>
---
fs/nfsd/nfs4xdr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 53ca43c..30913c8 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:
/*
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFSD: fix bug for readdir of pseudofs
2014-06-13 9:32 [PATCH] NFSD: fix bug for readdir of pseudofs Kinglong Mee
@ 2014-06-17 20:57 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2014-06-17 20:57 UTC (permalink / raw)
To: Kinglong Mee; +Cc: Linux NFS Mailing List
On Fri, Jun 13, 2014 at 05:32:42PM +0800, Kinglong Mee wrote:
> 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.
>
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
> fs/nfsd/nfs4xdr.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 53ca43c..30913c8 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:
> /*
> --
> 1.9.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-17 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 9:32 [PATCH] NFSD: fix bug for readdir of pseudofs Kinglong Mee
2014-06-17 20:57 ` J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox