jbd2: move load_superblock() into journal_init_common()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 11 Aug 2023 06:36:00 +0000 (14:36 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 15 Aug 2023 13:00:33 +0000 (09:00 -0400)
commitc30713084ba5b6fa343129613ec349ea91f0c458
tree04e3f69105b0ebda0e25c77ac9866ee38a49ed56
parent29a511e49f33426c8d24700db4842234a84678b2
jbd2: move load_superblock() into journal_init_common()

Move the call to load_superblock() from jbd2_journal_load() and
jbd2_journal_wipe() early into journal_init_common(), the journal
superblock gets read and the in-memory journal_t structure gets
initialised after calling jbd2_journal_init_{dev,inode}, it's safe to
do following initialization according to it.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230811063610.2980059-3-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/journal.c