dlm: fix wake_up() calls for pending remove
authorAlexander Aring <aahringo@redhat.com>
Wed, 6 Apr 2022 17:34:15 +0000 (13:34 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 6 Apr 2022 19:03:05 +0000 (14:03 -0500)
commitf6f7418357457ed58cbb020fc97e74d4e0e7b47f
tree5067609d4f83cb0d923714364ea843cd8a2e8d7f
parent2c3fa6ae4d520d59727dac33a3e14d42f3dd36d8
dlm: fix wake_up() calls for pending remove

This patch move the wake_up() call at the point when a remove message
completed. Before it was only when a remove message was going to be
sent. The possible waiter in wait_pending_remove() waits until a remove
is done if the resource name matches with the per ls variable
ls->ls_remove_name. If this is the case we must wait until a pending
remove is done which is indicated if DLM_WAIT_PENDING_COND() returns
false which will always be the case when ls_remove_len and
ls_remove_name are unset to indicate that a remove is not going on
anymore.

Fixes: 21d9ac1a5376 ("fs: dlm: use event based wait for pending remove")
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c