diff options
-rw-r--r-- | fs/omfs/dir.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/omfs/dir.c b/fs/omfs/dir.c index fd91f629ceb8..de4ff29f1e05 100644 --- a/fs/omfs/dir.c +++ b/fs/omfs/dir.c | |||
@@ -361,9 +361,10 @@ static int omfs_fill_chain(struct file *filp, void *dirent, filldir_t filldir, | |||
361 | 361 | ||
362 | res = filldir(dirent, oi->i_name, strnlen(oi->i_name, | 362 | res = filldir(dirent, oi->i_name, strnlen(oi->i_name, |
363 | OMFS_NAMELEN), filp->f_pos, self, d_type); | 363 | OMFS_NAMELEN), filp->f_pos, self, d_type); |
364 | if (res == 0) | ||
365 | filp->f_pos++; | ||
366 | brelse(bh); | 364 | brelse(bh); |
365 | if (res < 0) | ||
366 | break; | ||
367 | filp->f_pos++; | ||
367 | } | 368 | } |
368 | out: | 369 | out: |
369 | return res; | 370 | return res; |