Skip to content

Commit f8f0424

Browse files
author
Andreas Gruenbacher
committed
gfs2: glock cancelation flag fix
When an asynchronous glock holder is dequeued that hasn't been granted yet (HIF_HOLDER not set) and no dlm operation is in progress on behalf of that holder (GLF_LOCK not set), the dequeuing takes place in __gfs2_glock_dq(). There, we are not clearing the HIF_WAIT flag and waking up waiters. Fix that. This bug prevents the same holder from being enqueued later (gfs2_glock_nq()) without first reinitializing it (gfs2_holder_reinit()). The code doesn't currently use this pattern, but this will change in the next commit. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent b543459 commit f8f0424

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/gfs2/glock.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,8 @@ static void __gfs2_glock_dq(struct gfs2_holder *gh)
15451545
list_del_init(&gh->gh_list);
15461546
clear_bit(HIF_HOLDER, &gh->gh_iflags);
15471547
trace_gfs2_glock_queue(gh, 0);
1548+
if (test_bit(HIF_WAIT, &gh->gh_iflags))
1549+
gfs2_holder_wake(gh);
15481550

15491551
/*
15501552
* If there hasn't been a demote request we are done.

0 commit comments

Comments
 (0)