jbd2: switch to check format version in superblock directly
authorZhang Yi <yi.zhang@huawei.com>
Wed, 15 Mar 2023 01:31:26 +0000 (09:31 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 26 Jun 2023 23:35:13 +0000 (19:35 -0400)
commit5cf036d4f1489d7ba04b948e415f662521902c30
treeee8dce6a2f3e55ac109bc9816bbb5982a6a8f0c9
parent5c5bd1fef3ec913f9c597c6f61a9b903096415bf
jbd2: switch to check format version in superblock directly

We should only check and set extented features if journal format version
is 2, and now we check the in memory copy of the superblock
'journal->j_format_version', which relys on the parameter initialization
sequence, switch to use the h_blocktype in superblock cloud be more
clear.

Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230315013128.3911115-5-chengzhihao1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/journal.c
include/linux/jbd2.h