]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gfs2: Wake up when sd_glock_disposal becomes zero
authorAlexander Aring <aahringo@redhat.com>
Mon, 26 Oct 2020 14:52:29 +0000 (10:52 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:39:01 +0000 (12:39 +0100)
commitee4891e425bedb81ae866d4cf3e9e4a0406a5aca
tree0f10f6bde5aeeb7d8ab9877d285700f0391218d9
parent9c3962ba12c4e8cd1a40764a6b07b3604cbaa298
gfs2: Wake up when sd_glock_disposal becomes zero

commit da7d554f7c62d0c17c1ac3cc2586473c2d99f0bd upstream.

Commit fc0e38dae645 ("GFS2: Fix glock deallocation race") fixed a
sd_glock_disposal accounting bug by adding a missing atomic_dec
statement, but it failed to wake up sd_glock_wait when that decrement
causes sd_glock_disposal to reach zero.  As a consequence,
gfs2_gl_hash_clear can now run into a 10-minute timeout instead of
being woken up.  Add the missing wakeup.

Fixes: fc0e38dae645 ("GFS2: Fix glock deallocation race")
Cc: stable@vger.kernel.org # v2.6.39+
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/glock.c