Skip to content

Commit e7ffc0a

Browse files
author
Andreas Gruenbacher
committed
gfs2: a minor finish_xmote cleanup
As a minor clean-up to commit 1fc05c8 ("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>
1 parent 92cef39 commit e7ffc0a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/gfs2/glock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,11 @@ static void finish_xmote(struct gfs2_glock *gl, unsigned int ret)
609609
if (unlikely(gl->gl_state != gl->gl_target)) {
610610
struct gfs2_holder *gh = find_first_waiter(gl);
611611

612-
if (gh && (ret & LM_OUT_CANCELED))
613-
gfs2_holder_wake(gh);
614612
if (gh && !test_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags)) {
615613
if (ret & LM_OUT_CANCELED) {
616614
list_del_init(&gh->gh_list);
617615
trace_gfs2_glock_queue(gh, 0);
616+
gfs2_holder_wake(gh);
618617
gl->gl_target = gl->gl_state;
619618
goto out;
620619
}

0 commit comments

Comments
 (0)