Commit d3b39fcb authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

gfs2: gfs2_glock_hold cleanup



Use lockref_get_not_dead() instead of an unguarded __lockref_is_dead()
check.

Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 536f48e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
}