Skip to content

Commit 927cfc9

Browse files
author
Andreas Gruenbacher
committed
gfs2: Don't set GLF_LOCK in gfs2_dispose_glock_lru
In gfs2_dispose_glock_lru(), we want to skip glocks which are in the process of transitioning state (as indicated by the set GLF_LOCK flag), but we we don't need to set that flag for requesting a state transition. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent ee2be7d commit 927cfc9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/gfs2/glock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,14 +2017,13 @@ __acquires(&lru_lock)
20172017
atomic_inc(&lru_count);
20182018
continue;
20192019
}
2020-
if (test_and_set_bit(GLF_LOCK, &gl->gl_flags)) {
2020+
if (test_bit(GLF_LOCK, &gl->gl_flags)) {
20212021
spin_unlock(&gl->gl_lockref.lock);
20222022
goto add_back_to_lru;
20232023
}
20242024
gl->gl_lockref.count++;
20252025
if (demote_ok(gl))
20262026
handle_callback(gl, LM_ST_UNLOCKED, 0, false);
2027-
WARN_ON(!test_and_clear_bit(GLF_LOCK, &gl->gl_flags));
20282027
__gfs2_glock_queue_work(gl, 0);
20292028
spin_unlock(&gl->gl_lockref.lock);
20302029
cond_resched_lock(&lru_lock);

0 commit comments

Comments
 (0)