diff options
| author | Andreas Gruenbacher <agruenba@redhat.com> | 2025-11-18 23:19:45 +0300 |
|---|---|---|
| committer | Andreas Gruenbacher <agruenba@redhat.com> | 2026-01-26 16:28:18 +0300 |
| commit | d3b39fcb39574780fffec4357412ce0460339e9f (patch) | |
| tree | f8388d0f8429cadaf0df2ef2c7adde10c64e4fde | |
| parent | 536f48e8bbefcc067cb91d4edce452f3ff007ea6 (diff) | |
| download | linux-d3b39fcb39574780fffec4357412ce0460339e9f.tar.xz | |
gfs2: gfs2_glock_hold cleanup
Use lockref_get_not_dead() instead of an unguarded __lockref_is_dead()
check.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
| -rw-r--r-- | fs/gfs2/glock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 7c3d488327ee..bba415511920 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -185,8 +185,8 @@ static void gfs2_free_dead_glocks(struct gfs2_sbd *sdp) struct gfs2_glock *gfs2_glock_hold(struct gfs2_glock *gl) { - GLOCK_BUG_ON(gl, __lockref_is_dead(&gl->gl_lockref)); - lockref_get(&gl->gl_lockref); + if (!lockref_get_not_dead(&gl->gl_lockref)) + GLOCK_BUG_ON(gl, 1); return gl; } |
