From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Fri, 17 Mar 2023 16:41:02 -0400 Subject: [Cluster-devel] [PATCH 3/3] dlm_controld: remove unnecessary list_empty check In-Reply-To: <20230317204102.1776638-1-aahringo@redhat.com> References: <20230317204102.1776638-1-aahringo@redhat.com> Message-ID: <20230317204102.1776638-4-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 From: Andreas Gruenbacher 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 85d6fdf2..ad9b0f27 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.31.1