Patch "gfs2: Don't set GLF_LOCK in gfs2_dispose_glock_lru" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gfs2: Don't set GLF_LOCK in gfs2_dispose_glock_lru

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gfs2-don-t-set-glf_lock-in-gfs2_dispose_glock_lru.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c8bcdaacf56a91ff12a3d5728c32a4035d3b22ba
Author: Andreas Gruenbacher <agruenba@xxxxxxxxxx>
Date:   Tue Apr 9 07:11:48 2024 +0200

    gfs2: Don't set GLF_LOCK in gfs2_dispose_glock_lru
    
    [ Upstream commit 927cfc90d27cb7732a62464f95fd9aa7edfa9b70 ]
    
    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@xxxxxxxxxx>
    Stable-dep-of: 1e86044402c4 ("gfs2: Remove and replace gfs2_glock_queue_work")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 20fb2296fe3e0..f38d8558f4c18 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -2018,14 +2018,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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux