diff options
Diffstat (limited to 'fs/9p/vfs_dir.c')
-rw-r--r-- | fs/9p/vfs_dir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 899f168fd19c..b84ebe8cefed 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); |
@@ -314,4 +315,5 @@ const struct file_operations v9fs_dir_operations_dotl = { | |||
314 | .readdir = v9fs_dir_readdir_dotl, | 315 | .readdir = v9fs_dir_readdir_dotl, |
315 | .open = v9fs_file_open, | 316 | .open = v9fs_file_open, |
316 | .release = v9fs_dir_release, | 317 | .release = v9fs_dir_release, |
318 | .fsync = v9fs_file_fsync_dotl, | ||
317 | }; | 319 | }; |