summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-07-27 23:32:59 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2010-07-27 23:32:59 +0200
commitfc0f5ac8fe693d1b05f5a928cc48135d1c8b7f2e (patch)
treececa515ce66fb883247119953c62c9dc7e52b7df
parentgpio: fix spurious printk when freeing a gpio (diff)
parent9p: Pass the correct end of buffer to p9stat_read (diff)
downloadlinux-fc0f5ac8fe693d1b05f5a928cc48135d1c8b7f2e.tar.xz
linux-fc0f5ac8fe693d1b05f5a928cc48135d1c8b7f2e.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs: 9p: Pass the correct end of buffer to p9stat_read
-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);