From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Thu, 27 Oct 2022 16:45:16 -0400 Subject: [Cluster-devel] [PATCH v6.1-rc1 06/18] fs: dlm: let dlm_add_cb queue work after resume only In-Reply-To: <20221027204528.1119036-1-aahringo@redhat.com> References: <20221027204528.1119036-1-aahringo@redhat.com> Message-ID: <20221027204528.1119036-6-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We should allow dlm_add_cb() to call queue_work() only after the recovery queued pending for delayed lkbs. This patch will move the switch LSFL_CB_DELAY after the delayed lkb work was processed. Signed-off-by: Alexander Aring --- fs/dlm/ast.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c index d60a8d8f109d..6e07c151ad28 100644 --- a/fs/dlm/ast.c +++ b/fs/dlm/ast.c @@ -308,8 +308,6 @@ void dlm_callback_resume(struct dlm_ls *ls) if (!ls->ls_callback_wq) return; - clear_bit(LSFL_CB_DELAY, &ls->ls_flags); - more: mutex_lock(&ls->ls_cb_mutex); list_for_each_entry_safe(lkb, safe, &ls->ls_cb_delay, lkb_cb_list) { @@ -320,6 +318,8 @@ void dlm_callback_resume(struct dlm_ls *ls) break; } empty = list_empty(&ls->ls_cb_delay); + if (empty) + clear_bit(LSFL_CB_DELAY, &ls->ls_flags); mutex_unlock(&ls->ls_cb_mutex); sum += count; -- 2.31.1