Wengang Wang
2011-Jul-06 04:40 UTC
[Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir
Let ocfs2_dir_foreach return the error turned by filldir. Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com> --- fs/ocfs2/dir.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c index 8582e3f..6d7560a 100644 --- a/fs/ocfs2/dir.c +++ b/fs/ocfs2/dir.c @@ -2005,6 +2005,8 @@ 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; } -- 1.7.5.2
Sunil Mushran
2011-Jul-07 20:09 UTC
[Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir
On 07/05/2011 09:40 PM, Wengang Wang wrote:> Let ocfs2_dir_foreach return the error turned by filldir. > > Signed-off-by: Wengang Wang<wen.gang.wang at oracle.com> > --- > fs/ocfs2/dir.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c > index 8582e3f..6d7560a 100644 > --- a/fs/ocfs2/dir.c > +++ b/fs/ocfs2/dir.c > @@ -2005,6 +2005,8 @@ 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; > }That's not enough. Shouldn't it be "return ret" too. Have you triggered this error manually? I have never seen reports of it before.