]> 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)
commitadb916e3efeb28b18cb9d29908d571336a734882
treebda8bd670d667dee6b198c320ca863e2abc73396
parentae0d8f45df94e07186564ff65abd718d905a23ff
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