ext4: fix warning when submitting superblock in ext4_commit_super()
authorZhang Yi <yi.zhang@huawei.com>
Fri, 20 May 2022 02:32:16 +0000 (10:32 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 16 Jun 2022 15:50:48 +0000 (11:50 -0400)
commit15baa7dcadf1c4f0b4f752dc054191855ff2d78e
treebda8bd670d667dee6b198c320ca863e2abc73396
parent3103084afcf2341e12b0ee2c7b2ed570164f44a2
ext4: fix warning when submitting superblock in ext4_commit_super()

We have already check the io_error and uptodate flag before submitting
the superblock buffer, and re-set the uptodate flag if it has been
failed to write out. But it was lockless and could be raced by another
ext4_commit_super(), and finally trigger '!uptodate' WARNING when
marking buffer dirty. Fix it by submit buffer directly.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ritesh Harjani <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20220520023216.3065073-1-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/super.c