]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
jbd2: fix up sparse warnings in checkpoint code
authorTheodore Ts'o <tytso@mit.edu>
Sat, 7 Nov 2020 05:00:49 +0000 (00:00 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:26 +0000 (19:22 +0100)
commit3923dd25def337df6fe6c9b25314913df4385d4f
tree6b568eca001b25bfda3b9c8c10307f0249a3d7f3
parent07b4f1246b72343569e28b67efd47569fe62ec56
jbd2: fix up sparse warnings in checkpoint code

commit 05d5233df85e9621597c5838e95235107eb624a2 upstream.

Add missing __acquires() and __releases() annotations.  Also, in an
"this should never happen" WARN_ON check, if it *does* actually
happen, we need to release j_state_lock since this function is always
supposed to release that lock.  Otherwise, things will quickly grind
to a halt after the WARN_ON trips.

Fixes: 96f1e0974575 ("jbd2: avoid long hold times of j_state_lock...")
Cc: stable@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/jbd2/checkpoint.c
fs/jbd2/transaction.c