* [Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir
@ 2011-07-06 4:40 Wengang Wang
2011-07-07 20:09 ` Sunil Mushran
0 siblings, 1 reply; 4+ messages in thread
From: Wengang Wang @ 2011-07-06 4:40 UTC (permalink / raw)
To: ocfs2-devel
Let ocfs2_dir_foreach return the error turned by filldir.
Signed-off-by: Wengang Wang <wen.gang.wang@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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir
2011-07-06 4:40 [Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir Wengang Wang
@ 2011-07-07 20:09 ` Sunil Mushran
2011-07-08 2:07 ` Wengang Wang
0 siblings, 1 reply; 4+ messages in thread
From: Sunil Mushran @ 2011-07-07 20:09 UTC (permalink / raw)
To: ocfs2-devel
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@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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir
2011-07-07 20:09 ` Sunil Mushran
@ 2011-07-08 2:07 ` Wengang Wang
2011-07-08 2:31 ` Wengang Wang
0 siblings, 1 reply; 4+ messages in thread
From: Wengang Wang @ 2011-07-08 2:07 UTC (permalink / raw)
To: ocfs2-devel
On 11-07-07 13:09, Sunil Mushran wrote:
> 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@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.
If neccesary, We can return both ret and filldir_err.
>
> Have you triggered this error manually? I have never seen reports of it
> before.
No error here. This change is only needed for the following patch:
[PATCH 3/3] ocfs2: drop and retake orphan_dir.i_mutex in ocfs2_recover_orphans.
thanks,
wengang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir
2011-07-08 2:07 ` Wengang Wang
@ 2011-07-08 2:31 ` Wengang Wang
0 siblings, 0 replies; 4+ messages in thread
From: Wengang Wang @ 2011-07-08 2:31 UTC (permalink / raw)
To: ocfs2-devel
On 11-07-08 10:07, Wengang Wang wrote:
> On 11-07-07 13:09, Sunil Mushran wrote:
> > 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@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;
I meant "return ret" here.
> > > }
> >
> > That's not enough. Shouldn't it be "return ret" too.
>
> If neccesary, We can return both ret and filldir_err.
> >
> > Have you triggered this error manually? I have never seen reports of it
> > before.
>
> No error here. This change is only needed for the following patch:
> [PATCH 3/3] ocfs2: drop and retake orphan_dir.i_mutex in ocfs2_recover_orphans.
>
> thanks,
> wengang.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-08 2:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06 4:40 [Ocfs2-devel] [PATCH 2/3] ocfs2: let ocfs2_dir_foreach return the error turned by filldir Wengang Wang
2011-07-07 20:09 ` Sunil Mushran
2011-07-08 2:07 ` Wengang Wang
2011-07-08 2:31 ` Wengang Wang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.