]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7ce05bb5abc347dfb0204058651146a776f0d309
treebda8bd670d667dee6b198c320ca863e2abc73396
parent19cd3f2b2e4d72c731c5436292a6a9adb486874a
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