[Ocfs2-tools-devel] [PATCH] fsck.ocfs2: Set i_error properly fix_journals_func.

Tao Ma tao.ma at oracle.com
Mon Oct 27 00:52:40 PDT 2008


In fix_journals_func, when we reformat the journal,
the i_error should be reset to the return value.

Signed-off-by: Tao Ma <tao.ma at oracle.com>
---
 fsck.ocfs2/journal.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fsck.ocfs2/journal.c b/fsck.ocfs2/journal.c
index d571d3c..e53fa1a 100644
--- a/fsck.ocfs2/journal.c
+++ b/fsck.ocfs2/journal.c
@@ -825,10 +825,10 @@ static errcode_t fix_journals_func(o2fsck_state *ost,
 			err = ocfs2_make_journal(fs, ci->ci_blkno,
 						 jc->jc_max_clusters,
 						 &jc->jc_max_features);
-		}
 
-		ji->i_error = err;
-		goto out;
+			ji->i_error = err;
+			goto out;
+		}
 	}
 
 	if ((ji->i_error == OCFS2_ET_UNSUPP_FEATURE) ||
-- 
1.5.4.GIT




More information about the Ocfs2-tools-devel mailing list