diff options
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_dir.c | 3 |
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, | |||
242 | while (rdir->head < rdir->tail) { | 242 | while (rdir->head < rdir->tail) { |
243 | 243 | ||
244 | err = p9dirent_read(rdir->buf + rdir->head, | 244 | err = p9dirent_read(rdir->buf + rdir->head, |
245 | buflen - rdir->head, &curdirent, | 245 | rdir->tail - rdir->head, |
246 | &curdirent, | ||
246 | fid->clnt->proto_version); | 247 | fid->clnt->proto_version); |
247 | if (err < 0) { | 248 | if (err < 0) { |
248 | P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err); | 249 | P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err); |