summaryrefslogtreecommitdiff
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2022-12-10 04:21:32 +0300
committerAndreas Gruenbacher <agruenba@redhat.com>2023-02-01 00:40:24 +0300
commit228804a35caa7edae4a81049281e7f106dea1ad1 (patch)
treec1705faf952d80a9fcb6682accb0ebdbdb666148 /fs/gfs2/incore.h
parent8fb8f70ec71eb5ca51ecbfc2303523ff836648db (diff)
downloadlinux-228804a35caa7edae4a81049281e7f106dea1ad1.tar.xz
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: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
0 files changed, 0 insertions, 0 deletions