Skip to content
Commit 3c86794a authored by Murphy Zhou's avatar Murphy Zhou Committed by J. Bruce Fields
Browse files

nfsd/nfsd3_proc_readdir: fix buffer count and page pointers



After this commit
  f875a792 nfsd: allow nfsv3 readdir request to be larger.
nfsv3 readdir request size can be larger than PAGE_SIZE. So if the
directory been read is large enough, we can use multiple pages
in rq_respages. Update buffer count and page pointers like we do
in readdirplus to make this happen.

Now listing a directory within 3000 files will panic because we
are counting in a wrong way and would write on random page.

Fixes: f875a792 "nfsd: allow nfsv3 readdir request to be larger"
Signed-off-by: default avatarMurphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent d58431ea
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment