From e7ffc0af0e722b4634f997dcf63594b3c65a5884 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mon, 23 Jun 2025 22:20:55 +0200 Subject: [PATCH] gfs2: a minor finish_xmote cleanup As a minor clean-up to commit 1fc05c8d8426 ("gfs2: cancel timed-out glock requests"), when a demote request is in progress in finish_xmote(), there is no point in waking up the glock holder at the head of the queue because the reply from dlm cannot be on behalf of that glock holder. Signed-off-by: Andreas Gruenbacher Reviewed-by: Andrew Price --- fs/gfs2/glock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 053449a42b496..b6fd1cb17de7b 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -609,12 +609,11 @@ static void finish_xmote(struct gfs2_glock *gl, unsigned int ret) if (unlikely(gl->gl_state != gl->gl_target)) { struct gfs2_holder *gh = find_first_waiter(gl); - if (gh && (ret & LM_OUT_CANCELED)) - gfs2_holder_wake(gh); if (gh && !test_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags)) { if (ret & LM_OUT_CANCELED) { list_del_init(&gh->gh_list); trace_gfs2_glock_queue(gh, 0); + gfs2_holder_wake(gh); gl->gl_target = gl->gl_state; goto out; } -- 2.47.2