From 1c967ee1ecae6bd944d4d901bc7032a02f5547ee Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Mar 21 2023 13:03:44 +0000 Subject: 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(). --- diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index 85d6fdf..ad9b0f2 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)) {