Skip to content

Commit c9a0a4b

Browse files
author
Andreas Gruenbacher
committed
Revert "gfs2: fix glock shrinker ref issues"
This reverts commit 6286248. Commit 6286248 tried to fix issues introduced by commit 228804a ("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 6286248 so that we can fix commit 228804a properly. Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 5d92311 commit c9a0a4b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/gfs2/glock.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,9 +2056,7 @@ static long gfs2_scan_glock_lru(int nr)
20562056
if (!test_bit(GLF_LOCK, &gl->gl_flags)) {
20572057
if (!spin_trylock(&gl->gl_lockref.lock))
20582058
continue;
2059-
if (gl->gl_lockref.count <= 1 &&
2060-
(gl->gl_state == LM_ST_UNLOCKED ||
2061-
demote_ok(gl))) {
2059+
if (!gl->gl_lockref.count) {
20622060
list_move(&gl->gl_lru, &dispose);
20632061
atomic_dec(&lru_count);
20642062
freed++;

0 commit comments

Comments
 (0)