From accd768091ff54352e6ba76ec107c00692f86611 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Mar 07 2023 16:47:19 +0000 Subject: dlm_controld: remove ls parameter The ls parameter in write_result() is not used, so we can remove it. --- diff --git a/dlm_controld/plock.c b/dlm_controld/plock.c index c2c8036..462c921 100644 --- a/dlm_controld/plock.c +++ b/dlm_controld/plock.c @@ -684,8 +684,7 @@ static int add_waiter(struct lockspace *ls, struct resource *r, return 0; } -static void write_result(struct lockspace *ls, struct dlm_plock_info *in, - int rv) +static void write_result(struct dlm_plock_info *in, int rv) { int write_rv; @@ -719,7 +718,7 @@ static void do_waiters(struct lockspace *ls, struct resource *r) rv = lock_internal(ls, r, in); if (in->nodeid == our_nodeid) - write_result(ls, in, rv); + write_result(in, rv); free(w); } @@ -744,7 +743,7 @@ static void do_lock(struct lockspace *ls, struct dlm_plock_info *in, out: if (in->nodeid == our_nodeid && rv != -EINPROGRESS) - write_result(ls, in, rv); + write_result(in, rv); do_waiters(ls, r); put_resource(ls, r); @@ -768,7 +767,7 @@ static void do_unlock(struct lockspace *ls, struct dlm_plock_info *in, } if (in->nodeid == our_nodeid) - write_result(ls, in, rv); + write_result(in, rv); skip_result: do_waiters(ls, r); @@ -787,7 +786,7 @@ static void do_get(struct lockspace *ls, struct dlm_plock_info *in, else rv = 0; - write_result(ls, in, rv); + write_result(in, rv); put_resource(ls, r); } @@ -830,7 +829,7 @@ static void __receive_plock(struct lockspace *ls, struct dlm_plock_info *in, log_elock(ls, "receive_plock error from %d optype %d", from, in->optype); if (from == our_nodeid) - write_result(ls, in, -EINVAL); + write_result(in, -EINVAL); } }