summaryrefslogtreecommitdiff
path: root/fs/9p/vfs_dir.c
diff options
context:
space:
mode:
authorSripathi Kodi <sripathik@in.ibm.com>2010-08-09 11:33:10 +0000
committerEric Van Hensbergen <ericvh@gmail.com>2010-10-28 09:08:44 -0500
commit8812a3d5f873e28cd08ec8afe328c4182b72db49 (patch)
tree8e1ce30ea7bb5f3cf0c19394ade1e101617581f7 /fs/9p/vfs_dir.c
parent3834b12a18d51d6c535ea52e16355d75806ffe38 (diff)
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: Sripathi Kodi <sripathik@in.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_dir.c')
-rw-r--r--fs/9p/vfs_dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 899f168fd19c..170f5bb8ebe0 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -242,7 +242,8 @@ static int v9fs_dir_readdir_dotl(struct file *filp, void *dirent,
while (rdir->head < rdir->tail) {
err = p9dirent_read(rdir->buf + rdir->head,
- buflen - rdir->head, &curdirent,
+ rdir->tail - rdir->head,
+ &curdirent,
fid->clnt->proto_version);
if (err < 0) {
P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);