From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Fri, 10 Jun 2022 13:06:16 -0400 Subject: [Cluster-devel] [PATCH v5.19-rc1 7/7] fs: dlm: add WARN_ON for non waiter case In-Reply-To: <20220610170616.3480642-1-aahringo@redhat.com> References: <20220610170616.3480642-1-aahringo@redhat.com> Message-ID: <20220610170616.3480642-8-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 This patch adds a WARN_ON if recovery hits a critical error but no caller was waiting in dlm_new_lockspace(), this can occur e.g. if a node got fences. The WARN_ON signals us to investigate into this case that it should not occur. Signed-off-by: Alexander Aring --- fs/dlm/recoverd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c index eeb221c175a2..240267568aab 100644 --- a/fs/dlm/recoverd.c +++ b/fs/dlm/recoverd.c @@ -311,6 +311,7 @@ static void do_ls_recovery(struct dlm_ls *ls) /* let new_lockspace() get aware of critical error */ ls->ls_recovery_result = error; + WARN_ON(completion_done(&ls->ls_recovery_done)); complete(&ls->ls_recovery_done); break; } -- 2.31.1