Wengang Wang
2011-Jul-29 10:06 UTC
[Ocfs2-devel] [PATCH 2/4] ocfs2: ocfs2_dir_foreach returns the error turned by filldir
try to return the error turned by filldir in ocfs2_dir_foreach. Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com> --- fs/ocfs2/dir.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 3302088..4b365a1 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -2004,8 +2004,10 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv, if (ret > 0) ret = -EIO; + if (!ret) + ret = filldir_err; - return 0; + return ret; } /* -- 1.7.5.2
Joel Becker
2011-Aug-22 04:43 UTC
[Ocfs2-devel] [PATCH 2/4] ocfs2: ocfs2_dir_foreach returns the error turned by filldir
On Fri, Jul 29, 2011 at 06:06:06PM +0800, Wengang Wang wrote:> try to return the error turned by filldir in ocfs2_dir_foreach. > > Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>NAK. No one returns it. The wrapper vfs_readdir pulls buf->error out just like you were trying to in this patch. Joel> --- > fs/ocfs2/dir.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c > index 3302088..4b365a1 100644 > --- a/fs/ocfs2/dir.c > +++ b/fs/ocfs2/dir.c > @@ -2004,8 +2004,10 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv, > > if (ret > 0) > ret = -EIO; > + if (!ret) > + ret = filldir_err; > > - return 0; > + return ret; > } > > /* > -- > 1.7.5.2 > > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > http://oss.oracle.com/mailman/listinfo/ocfs2-devel-- "Ninety feet between bases is perhaps as close as man has ever come to perfection." - Red Smith http://www.jlbec.org/ jlbec at evilplan.org