Skip to content
Commit 228804a3 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

gfs2: Make glock lru list scanning safer



In __gfs2_glock_put(), remove the glock from the lru list *after*
dropping the glock lock.  This prevents deadlocks against
gfs2_scan_glock_lru().

In gfs2_scan_glock_lru(), make sure that the glock's reference count is
zero before moving the glock to the dispose list.  This skips glocks
that are marked dead as well as glocks that are still in use.
Additionally, switch to spin_trylock() as we already do in
gfs2_dispose_glock_lru(); this alone would also be enough to prevent
deadlocks against __gfs2_glock_put().

Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 8fb8f70e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment