summaryrefslogtreecommitdiff
path: root/fs/9p/vfs_dir.c
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2010-07-19 15:40:03 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2010-07-27 14:52:04 -0500
commitda7ddd3296505b4cb46685e1bbf7d0075b3cd4f1 (patch)
tree45fcc62918193eba6e2aef40e1df0d2ef2e1df32 /fs/9p/vfs_dir.c
parentd15aa2cc641bd193596382357de917b32f1b40cb (diff)
9p: Pass the correct end of buffer to p9stat_read
Pass the correct end of the buffer to p9stat_read. Signed-off-by: Latchesar Ionkov <lucho@ionkov.net> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_dir.c')
-rw-r--r--fs/9p/vfs_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index d61e3b28ce37..36d961f342af 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -146,7 +146,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir)
while (rdir->head < rdir->tail) {
p9stat_init(&st);
err = p9stat_read(rdir->buf + rdir->head,
- buflen - rdir->head, &st,
+ rdir->tail - rdir->head, &st,
fid->clnt->proto_version);
if (err) {
P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err);