Commit 8812a3d5 authored by Sripathi Kodi's avatar Sripathi Kodi Committed by Eric Van Hensbergen

9p: Pass the correct end of buffer to p9dirent_read

A patch was accepted recently for sending correct buffer size to p9stat_read.
We need a similar patch in v9fs_dir_readdir_dotl to send correct end of buffer
to p9dirent_read.
Signed-off-by: default avatarSripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: default avatarEric Van Hensbergen <ericvh@gmail.com>
parent 3834b12a
...@@ -242,7 +242,8 @@ static int v9fs_dir_readdir_dotl(struct file *filp, void *dirent, ...@@ -242,7 +242,8 @@ static int v9fs_dir_readdir_dotl(struct file *filp, void *dirent,
while (rdir->head < rdir->tail) { while (rdir->head < rdir->tail) {
err = p9dirent_read(rdir->buf + rdir->head, err = p9dirent_read(rdir->buf + rdir->head,
buflen - rdir->head, &curdirent, rdir->tail - rdir->head,
&curdirent,
fid->clnt->proto_version); fid->clnt->proto_version);
if (err < 0) { if (err < 0) {
P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err); P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);
......
Markdown is supported
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