mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
gfs2: harden gfs2_glock_hold
Function gfs2_glock_hold() is expected only to be called when the glock is held, so use lockref_get_not_zero() instead of lockref_get_not_dead(). In addition, when an asynchronous callback arrives in gfs2_glock_cb(), the glock can already be dead (from __gfs2_glock_put()), or it can be on the glock lru list with refcount 0, so we cannot use gfs2_glock_hold() there. With gfs2_glock_cb() now handling dead glocks, we can remove the racy check in gdlm_bast(). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
da26828b82
commit
657e5af4fe
2 changed files with 4 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue