File 0017-dlm_controld-remove-unnecessary-list_empty-check.patch of Package libdlm

From 1c967ee1ecae6bd944d4d901bc7032a02f5547ee Mon Sep 17 00:00:00 2001
From: Andreas Gruenbacher <agruenba@redhat.com>
Date: Wed, 8 Mar 2023 22:18:47 +0100
Subject: [PATCH 17/24] dlm_controld: remove unnecessary list_empty check

All that do_waiters() does is iterate the the waiters list of a
resource, so there is no need to check if the waiters list is empty
before calling do_waiters().
---
 dlm_controld/plock.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c
index 85d6fdf2819b..ad9b0f2788aa 100644
--- a/dlm_controld/plock.c
+++ b/dlm_controld/plock.c
@@ -2055,8 +2055,7 @@ void purge_plocks(struct lockspace *ls, int nodeid, int unmount)
 			send_pending_plocks(ls, r);
 		}
 		
-		if (!list_empty(&r->waiters))
-			do_waiters(ls, r);
+		do_waiters(ls, r);
 
 		if (!opt(plock_ownership_ind) &&
 		    list_empty(&r->locks) && list_empty(&r->waiters)) {
-- 
2.35.3

openSUSE Build Service is sponsored by