diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/vfs_dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 76c3b1ab6361..5cc00e56206e 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c | |||
@@ -138,6 +138,8 @@ static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx) | |||
138 | &err); | 138 | &err); |
139 | if (err) | 139 | if (err) |
140 | return err; | 140 | return err; |
141 | if (n == 0) | ||
142 | return 0; | ||
141 | 143 | ||
142 | rdir->head = 0; | 144 | rdir->head = 0; |
143 | rdir->tail = n; | 145 | rdir->tail = n; |