Skip to content

Commit

Permalink
dlm: clear ast_type when removing from astqueue
Browse files Browse the repository at this point in the history
The lkb_ast_type field indicates whether the lkb is on the astqueue list.
When clearing locks for a process, lkb's were being removed from the astqueue
list without clearing the field.  If release_lockspace then happened
immediately afterward, it could try to remove the lkb from the list a second
time.

Appears when process calls libdlm dlm_release_lockspace() which first
closes the ls dev triggering clear_proc_locks, and then removes the ls
(a write to control dev) causing release_lockspace().

Signed-off-by: David Teigland <teigland@redhat.com>
  • Loading branch information
David Teigland committed Jan 30, 2008
1 parent 861e236 commit 8a358ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -4678,6 +4678,7 @@ void dlm_clear_proc_locks(struct dlm_ls *ls, struct dlm_user_proc *proc)
}

list_for_each_entry_safe(lkb, safe, &proc->asts, lkb_astqueue) {
lkb->lkb_ast_type = 0;
list_del(&lkb->lkb_astqueue);
dlm_put_lkb(lkb);
}
Expand Down

0 comments on commit 8a358ca

Please sign in to comment.