Commit c9a0a4b0 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher

Revert "gfs2: fix glock shrinker ref issues"

This reverts commit 62862485.

Commit 62862485 tried to fix issues introduced by commit
228804a3 ("gfs2: Make glock lru list scanning safer"), but like that
commit, it failed to account for the bias state_change() adds to the
glock reference count for locked glocks.  Revert commit 62862485 so
that we can fix commit 228804a3 properly.
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 5d923111
......@@ -2056,9 +2056,7 @@ static long gfs2_scan_glock_lru(int nr)
if (!test_bit(GLF_LOCK, &gl->gl_flags)) {
if (!spin_trylock(&gl->gl_lockref.lock))
continue;
if (gl->gl_lockref.count <= 1 &&
(gl->gl_state == LM_ST_UNLOCKED ||
demote_ok(gl))) {
if (!gl->gl_lockref.count) {
list_move(&gl->gl_lru, &dispose);
atomic_dec(&lru_count);
freed++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment