aboutsummaryrefslogtreecommitdiffstats
path: root/fs/omfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-03-04 01:43:36 -0500
committerBob Copeland <me@bobcopeland.com>2011-03-05 16:24:12 -0500
commit31be83aeaee22fa165862ad449c7131ceaf1cf91 (patch)
treec63e3f3956c63aacfb438e0edb13402cdc16d8f3 /fs/omfs
parentd932805b3dc8c6d80d8948f7d7d0d8336d53b2ed (diff)
omfs: make readdir stop when filldir says so
filldir returning an error does *not* mean "skip this entry, try the next one"... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Bob Copeland <me@bobcopeland.com>
Diffstat (limited to 'fs/omfs')
-rw-r--r--fs/omfs/dir.c5
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 }
368out: 369out:
369 return res; 370 return res;