diff options
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 6768c5aa3fee..bd9aff9701c0 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -2222,12 +2222,14 @@ static void ext4_mark_recovery_complete(struct super_block * sb, | |||
2222 | 2222 | ||
2223 | jbd2_journal_lock_updates(journal); | 2223 | jbd2_journal_lock_updates(journal); |
2224 | jbd2_journal_flush(journal); | 2224 | jbd2_journal_flush(journal); |
2225 | lock_super(sb); | ||
2225 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER) && | 2226 | if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER) && |
2226 | sb->s_flags & MS_RDONLY) { | 2227 | sb->s_flags & MS_RDONLY) { |
2227 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); | 2228 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); |
2228 | sb->s_dirt = 0; | 2229 | sb->s_dirt = 0; |
2229 | ext4_commit_super(sb, es, 1); | 2230 | ext4_commit_super(sb, es, 1); |
2230 | } | 2231 | } |
2232 | unlock_super(sb); | ||
2231 | jbd2_journal_unlock_updates(journal); | 2233 | jbd2_journal_unlock_updates(journal); |
2232 | } | 2234 | } |
2233 | 2235 | ||
@@ -2416,7 +2418,13 @@ static int ext4_remount (struct super_block * sb, int * flags, char * data) | |||
2416 | (sbi->s_mount_state & EXT4_VALID_FS)) | 2418 | (sbi->s_mount_state & EXT4_VALID_FS)) |
2417 | es->s_state = cpu_to_le16(sbi->s_mount_state); | 2419 | es->s_state = cpu_to_le16(sbi->s_mount_state); |
2418 | 2420 | ||
2421 | /* | ||
2422 | * We have to unlock super so that we can wait for | ||
2423 | * transactions. | ||
2424 | */ | ||
2425 | unlock_super(sb); | ||
2419 | ext4_mark_recovery_complete(sb, es); | 2426 | ext4_mark_recovery_complete(sb, es); |
2427 | lock_super(sb); | ||
2420 | } else { | 2428 | } else { |
2421 | __le32 ret; | 2429 | __le32 ret; |
2422 | if ((ret = EXT4_HAS_RO_COMPAT_FEATURE(sb, | 2430 | if ((ret = EXT4_HAS_RO_COMPAT_FEATURE(sb, |