summaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2025-06-23 22:20:55 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2025-07-15 04:20:40 +0200
commite7ffc0af0e722b4634f997dcf63594b3c65a5884 (patch)
tree100d1314b2a6a63877b19cb452f159ff9a87ca29 /fs/gfs2
parentgfs2: simplify finish_xmote (diff)
downloadlinux-e7ffc0af0e722b4634f997dcf63594b3c65a5884.tar.gz
linux-e7ffc0af0e722b4634f997dcf63594b3c65a5884.zip
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 <agruenba@redhat.com> Reviewed-by: Andrew Price <anprice@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 053449a42b49..b6fd1cb17de7 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;
}