ocfs2: let ocfs2_dir_foreach return the error turned by filldir
PATCH 2/3 ocfs2: let ocfs2_dir_foreach return the error turned by filldir
Let ocfs2_dir_foreach return the error turned by filldir.
--- fs/ocfs2/dir.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/ocfs2/dir.c +2 -0
@@ -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 ; }
Signature · 1 line
1.7.5.2
PATCH 2/3 ocfs2: let ocfs2_dir_foreach return the error turned by filldir
Quoted 12 lines · Wengang Wang
Let
ocfs2_dir_foreachreturn the error turned by filldir.Signed-off-by Wengang Wang<[email protected]>--- fs/ocfs2/dir.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fs/ocfs2/dir.c +0
-0
fs/ocfs2/dir.c int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv, · line 2012
Quoted 8 lines
fs/ocfs2/dir.c +2
-0@@ -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.
PATCH 2/3 ocfs2: let ocfs2_dir_foreach return the error turned by filldir
Quoted 19 lines · Sunil Mushran
Quoted 18 lines · Wengang Wang
Let
ocfs2_dir_foreachreturn the error turned by filldir.Signed-off-by Wengang Wang<[email protected]>--- fs/ocfs2/dir.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fs/ocfs2/dir.c +2
-0@@ -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;
Quoted 4 lines
fs/ocfs2/dir.c int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv, · line 2012
Quoted 2 lines
fs/ocfs2/dir.c +0
-0return 0 ; }That's not enough. Shouldn't it be "return ret" too.
If neccesary, We can return both ret and filldir_err.
Quoted 3 lines
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.
PATCH 2/3 ocfs2: let ocfs2_dir_foreach return the error turned by filldir
Quoted 15 lines · Wengang Wang
Quoted 14 lines · Sunil Mushran
Quoted 13 lines · Wengang Wang
Let
ocfs2_dir_foreachreturn the error turned by filldir.Signed-off-by Wengang Wang<[email protected]>--- fs/ocfs2/dir.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)fs/ocfs2/dir.c +0
-0@@ -2005,6 +2005,8 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv,
Quoted 6 lines
Quoted 6 lines
fs/ocfs2/dir.c int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv, · line 2011
Quoted 6 lines
fs/ocfs2/dir.c +2
-0if (ret>0 ) ret = -EIO ; +if (!ret) + ret = filldir_err;return 0 ;
I meant "return ret" here.
Quoted 14 lines
Quoted 3 lines
fs/ocfs2/dir.c int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv, · line 2012
Quoted 1 line
fs/ocfs2/dir.c +0
-0}That's not enough. Shouldn't it be "return ret" too.
If neccesary, We can return both ret and
filldir_err.Quoted 3 lines
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 inocfs2_recover_orphans.thanks,
wengang.