]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: annotate data race in jbd2_journal_dirty_metadata()
authorJan Kara <jack@suse.cz>
Tue, 6 Apr 2021 16:18:00 +0000 (18:18 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 10 Apr 2021 01:19:33 +0000 (21:19 -0400)
commitcd8e9d99b933853e2becc123971bc3578bcb1266
tree535b2010b4f2a1bc0333c7d67e570befd0bfc361
parent67c022b37d61a7bbf73df821d872db2032287a8b
ext4: annotate data race in jbd2_journal_dirty_metadata()

Assertion checks in jbd2_journal_dirty_metadata() are known to be racy
but we don't want to be grabbing locks just for them.  We thus recheck
them under b_state_lock only if it looks like they would fail. Annotate
the checks with data_race().

Cc: stable@kernel.org
Reported-by: Hao Sun <sunhao.th@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210406161804.20150-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/jbd2/transaction.c