]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:06:35 +0000 (12:06 +0100)
commit70616e51030a1a03b6f877c94a674c6da3d41d99
treefb38b9dbe0f0fb705edcfb050221983e576c1266
parent3e6c8df840b2bebffdc22dc6f9e014b5c9a8e813
jbd2: fix up sparse warnings in checkpoint code

BugLink: https://bugs.launchpad.net/bugs/1905618
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/jbd2/checkpoint.c
fs/jbd2/transaction.c