提交 31be83ae 编写于 作者: A Al Viro 提交者: 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: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NBob Copeland <me@bobcopeland.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册