diff options
author | Jon Maloy <jmaloy@redhat.com> | 2021-03-16 22:06:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-17 11:51:04 -0700 |
commit | 2c98da0790634d0ec08ff7856769ffb56ca7c469 (patch) | |
tree | 825cda694feaa2d7093918a19725eedb09447686 /net/tipc/name_distr.c | |
parent | a45ffa68573e97fdced4b08aef19efda555f18bc (diff) | |
download | linux-2c98da0790634d0ec08ff7856769ffb56ca7c469.tar.gz linux-2c98da0790634d0ec08ff7856769ffb56ca7c469.tar.bz2 linux-2c98da0790634d0ec08ff7856769ffb56ca7c469.zip |
tipc: simplify signature of tipc_nametbl_withdraw() functions
Following the principles of the preceding commits, we reduce
the number of parameters passed along in tipc_sk_withdraw(),
tipc_nametbl_withdraw() and associated functions.
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Hoang Le <hoang.h.le@dektech.com.au>
Acked-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Acked-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/name_distr.c')
-rw-r--r-- | net/tipc/name_distr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index 727f8c54df6b..9e2fab3569b5 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c @@ -244,17 +244,19 @@ static void tipc_publ_purge(struct net *net, struct publication *p, u32 addr) { struct tipc_net *tn = tipc_net(net); struct publication *_p; + struct tipc_uaddr ua; + tipc_uaddr(&ua, TIPC_SERVICE_RANGE, p->scope, p->sr.type, + p->sr.lower, p->sr.upper); spin_lock_bh(&tn->nametbl_lock); - _p = tipc_nametbl_remove_publ(net, p->sr.type, p->sr.lower, - p->sr.upper, p->sk.node, p->key); + _p = tipc_nametbl_remove_publ(net, &ua, &p->sk, p->key); if (_p) tipc_node_unsubscribe(net, &_p->binding_node, addr); spin_unlock_bh(&tn->nametbl_lock); if (_p != p) { pr_err("Unable to remove publication from failed node\n" - " (type=%u, lower=%u, node=0x%x, port=%u, key=%u)\n", + " (type=%u, lower=%u, node=%u, port=%u, key=%u)\n", p->sr.type, p->sr.lower, p->sk.node, p->sk.ref, p->key); } @@ -309,8 +311,7 @@ static bool tipc_update_nametbl(struct net *net, struct distr_item *i, return true; } } else if (dtype == WITHDRAWAL) { - p = tipc_nametbl_remove_publ(net, ua.sr.type, ua.sr.lower, - ua.sr.upper, node, key); + p = tipc_nametbl_remove_publ(net, &ua, &sk, key); if (p) { tipc_node_unsubscribe(net, &p->binding_node, node); kfree_rcu(p, rcu); |