diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 20fb2296fe3e..f38d8558f4c1 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -2018,14 +2018,13 @@ add_back_to_lru: atomic_inc(&lru_count); continue; } - if (test_and_set_bit(GLF_LOCK, &gl->gl_flags)) { + if (test_bit(GLF_LOCK, &gl->gl_flags)) { spin_unlock(&gl->gl_lockref.lock); goto add_back_to_lru; } gl->gl_lockref.count++; if (demote_ok(gl)) handle_callback(gl, LM_ST_UNLOCKED, 0, false); - WARN_ON(!test_and_clear_bit(GLF_LOCK, &gl->gl_flags)); __gfs2_glock_queue_work(gl, 0); spin_unlock(&gl->gl_lockref.lock); cond_resched_lock(&lru_lock);