gfs2: Fix atomic bug in gfs2_instantiate
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 3 Nov 2021 15:15:51 +0000 (16:15 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Nov 2021 16:03:31 +0000 (17:03 +0100)
commit7a92deaae613c3b95f0fd02814bb09be7f7a5820
treeee92c3e417527759eb9129d219138e43132998dd
parent9642c8c44d0db43bc20a166dd70ac6d2ab3ce5b9
gfs2: Fix atomic bug in gfs2_instantiate

Replace test_bit() + set_bit() with test_and_set_bit() where we need an atomic
operation.  Use clear_and_wake_up_bit() instead of open coding it.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/glock.c