Skip to content

Commit 9600f3e

Browse files
zhangyi089tytso
authored andcommitted
jbd2: don't load superblock in jbd2_journal_check_used_features()
Since load_superblock() has been moved to journal_init_common(), the in-memory superblock structure is initialized and contains valid data once the file system has a journal_t object, so it's safe to access it, let's drop the call to journal_get_superblock() from jbd2_journal_check_used_features() and also drop the setting/clearing of the veirfy bit of the superblock buffer. Signed-off-by: Zhang Yi <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent c307130 commit 9600f3e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

fs/jbd2/journal.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,6 @@ static int journal_get_superblock(journal_t *journal)
13611361
bh = journal->j_sb_buffer;
13621362

13631363
J_ASSERT(bh != NULL);
1364-
if (buffer_verified(bh))
1365-
return 0;
13661364

13671365
err = bh_read(bh, 0);
13681366
if (err < 0) {
@@ -1437,7 +1435,6 @@ static int journal_get_superblock(journal_t *journal)
14371435
goto out;
14381436
}
14391437
}
1440-
set_buffer_verified(bh);
14411438
return 0;
14421439

14431440
out:
@@ -2226,8 +2223,6 @@ int jbd2_journal_check_used_features(journal_t *journal, unsigned long compat,
22262223

22272224
if (!compat && !ro && !incompat)
22282225
return 1;
2229-
if (journal_get_superblock(journal))
2230-
return 0;
22312226
if (!jbd2_format_support_feature(journal))
22322227
return 0;
22332228

0 commit comments

Comments
 (0)