Commit 31be83ae authored by Al Viro's avatar Al Viro Committed by Bob Copeland

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
parent d932805b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment