aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLatchesar Ionkov2010-07-19 15:40:03 -0500
committerJesper Nilsson2010-08-04 12:58:55 +0200
commit26bfeea38a4a5daf52c8f01c986ca8680bf1f6a1 (patch)
treececa515ce66fb883247119953c62c9dc7e52b7df
parent6a99ad4a2e1b1693ffe8e40cc0dddfc633ce2a50 (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>
-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);