ext3: call ext3_mark_recovery_complete() when recovery is really needed
authorEryu Guan <guaneryu@gmail.com>
Tue, 1 Nov 2011 02:06:19 +0000 (10:06 +0800)
committerJan Kara <jack@suse.cz>
Wed, 9 Nov 2011 11:23:17 +0000 (12:23 +0100)
Call ext3_mark_recovery_complete() in ext3_fill_super() only if
needs_recovery is non-zero.

Besides that, print out "recovery complete" message after calling
ext3_mark_recovery_complete().

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext3/super.c

index 922d289aeeb315ce4a5c1131371ea90f266c0df4..767fa3a2bd1756da54e222d311f5ad8c487bba77 100644 (file)
@@ -2060,9 +2060,10 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
        EXT3_SB(sb)->s_mount_state |= EXT3_ORPHAN_FS;
        ext3_orphan_cleanup(sb, es);
        EXT3_SB(sb)->s_mount_state &= ~EXT3_ORPHAN_FS;
-       if (needs_recovery)
+       if (needs_recovery) {
+               ext3_mark_recovery_complete(sb, es);
                ext3_msg(sb, KERN_INFO, "recovery complete");
-       ext3_mark_recovery_complete(sb, es);
+       }
        ext3_msg(sb, KERN_INFO, "mounted filesystem with %s data mode",
                test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_JOURNAL_DATA ? "journal":
                test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered":