ocfs2: fix improper handling of return errno
PATCH 1/1 ocfs2: fix improper handling of return errno
Previously, if bad inode was found in ocfs2_iget(), -ESTALE?was returned back to the caller anyway. Since commit d2b9d71a2da7 ("ocfs2: check/fix inode block for online file check") can handle with return value from ocfs2_read_locked_inode() now, we know the exact errno returned for us.
--- fs/ocfs2/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
fs/ocfs2/inode.c +1 -6
@@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags, }if (is_bad_inode (inode)) {iput (inode); -if ((flags &OCFS2_FI_FLAG_FILECHECK_CHK ) || - (flags &OCFS2_FI_FLAG_FILECHECK_FIX )) -/* Return OCFS2_FILECHECK_ERR_XXX related errno */ - inode =ERR_PTR (rc); -else - inode =ERR_PTR (-ESTALE ); + inode =ERR_PTR (rc); goto bail; }
Signature · 1 line
2.6.6
PATCH 1/1 ocfs2: fix improper handling of return errno
Quoted 7 lines · Eric Ren
Previously, if bad inode was found in
ocfs2_iget(),-ESTALEwas returned back to the caller anyway. Since commitd2b9d71a2da7("ocfs2: check/fix inode block for online file check") can handle with return value fromocfs2_read_locked_inode()now, we know the exact errno returned for us.Signed-off-by Eric Ren <[email protected]>
Looks good to me, thanks.
Quoted 23 lines
--- fs/ocfs2/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)fs/ocfs2/inode.c +1
-6@@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags, }if (is_bad_inode (inode)) {iput (inode); -if ((flags &OCFS2_FI_FLAG_FILECHECK_CHK ) || - (flags &OCFS2_FI_FLAG_FILECHECK_FIX )) -/* Return OCFS2_FILECHECK_ERR_XXX related errno */ - inode =ERR_PTR (rc); -else - inode =ERR_PTR (-ESTALE ); + inode =ERR_PTR (rc); goto bail; }
PATCH 1/1 ocfs2: fix improper handling of return errno
Quoted 11 lines
Quoted 4 lines
Quoted 4 lines
Quoted 6 lines · Eric Ren
Previously, if bad inode was found in
ocfs2_iget(),-ESTALEwas returned back to the caller anyway. Since commitd2b9d71a2da7("ocfs2: check/fix inode block for online file check") can handle with return value fromocfs2_read_locked_inode()now, we know the exact errno returned for us.
Quoted 3 lines
Quoted 1 line
Signed-off-by Eric Ren <[email protected]>Looks good to me, thanks.
Reviewed-by Joseph Qi <[email protected]>
Quoted 32 lines
fs/ocfs2/inode.c struct inode *ocfs2_iget(struct ocfs2_super *osb, u64
Quoted 10 lines
--- fs/ocfs2/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)fs/ocfs2/inode.c +0
-0@@ -176,12 +176,7 @@ struct inode *ocfs2_iget(struct ocfs2_super *osb, u64blkno, unsigned flags,
Quoted 4 lines
fs/ocfs2/inode.c +0
-0}if (is_bad_inode (inode)) {iput (inode);fs/ocfs2/inode.c struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags, · line 182
Quoted 10 lines
fs/ocfs2/inode.c +1
-6-if ((flags &OCFS2_FI_FLAG_FILECHECK_CHK ) || - (flags &OCFS2_FI_FLAG_FILECHECK_FIX )) -/* Return OCFS2_FILECHECK_ERR_XXX related errno */ - inode =ERR_PTR (rc); -else - inode =ERR_PTR (-ESTALE ); + inode =ERR_PTR (rc); goto bail; }_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel