aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2
diff options
context:
space:
mode:
authorGravatar Andreas Gruenbacher <agruenba@redhat.com> 2024-04-09 07:11:48 +0200
committerGravatar Andreas Gruenbacher <agruenba@redhat.com> 2024-04-09 18:35:57 +0200
commit927cfc90d27cb7732a62464f95fd9aa7edfa9b70 (patch)
tree690b48154403d87bf2451fdc48004cf824bd134b /fs/gfs2
parentgfs2: Replace gfs2_glock_queue_put with gfs2_glock_put_async (diff)
downloadlinux-927cfc90d27cb7732a62464f95fd9aa7edfa9b70.tar.gz
linux-927cfc90d27cb7732a62464f95fd9aa7edfa9b70.tar.bz2
linux-927cfc90d27cb7732a62464f95fd9aa7edfa9b70.zip
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>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/glock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index ed90033b9c72..a700e424f790 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -2017,14 +2017,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);