author: Al Viro <viro@zeniv.linux.org.uk> 2011-03-04 01:43:36 -0500
committer: Bob Copeland <me@bobcopeland.com> 2011-03-05 16:24:12 -0500
commit: 31be83aeaee22fa165862ad449c7131ceaf1cf91
parent: d932805b3dc8c6d80d8948f7d7d0d8336d53b2ed
Commit Summary:
Diffstat:
1 file 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,
res = filldir(dirent, oi->i_name, strnlen(oi->i_name,
OMFS_NAMELEN), filp->f_pos, self, d_type);
- if (res == 0)
- filp->f_pos++;
brelse(bh);
+ if (res < 0)
+ break;
+ filp->f_pos++;
}
out:
return res;