mirror of
https://github.com/torvalds/linux
synced 2024-09-06 09:51:23 +00:00
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>
This commit is contained in:
parent
ee2be7d7c7
commit
927cfc90d2
|
@ -2017,14 +2017,13 @@ __acquires(&lru_lock)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue