summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_dir.c
diff options
context:
space:
mode:
authorLatchesar Ionkov <lucho@ionkov.net>2010-07-19 22:40:03 +0200
committerEric Van Hensbergen <ericvh@gmail.com>2010-07-27 21:52:04 +0200
commitda7ddd3296505b4cb46685e1bbf7d0075b3cd4f1 (patch)
tree45fcc62918193eba6e2aef40e1df0d2ef2e1df32 /fs/9p/vfs_dir.c
parentMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus... (diff)
downloadlinux-da7ddd3296505b4cb46685e1bbf7d0075b3cd4f1.tar.xz
linux-da7ddd3296505b4cb46685e1bbf7d0075b3cd4f1.zip
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);