diff options
author | Jon Maloy <jon.maloy@ericsson.com> | 2018-03-22 20:42:49 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-23 18:12:18 +0100 |
commit | 23fd3eace088ab1872ee59c19191a119ec779ac9 (patch) | |
tree | 9469f540f7bd0279b0359bff04362877bd28e27b /net/tipc/name_table.c | |
parent | tipc: allow closest-first lookup algorithm when legacy address is configured (diff) | |
download | linux-23fd3eace088ab1872ee59c19191a119ec779ac9.tar.xz linux-23fd3eace088ab1872ee59c19191a119ec779ac9.zip |
tipc: remove direct accesses to own_addr field in struct tipc_net
As a preparation to changing the addressing structure of TIPC we replace
all direct accesses to the tipc_net::own_addr field with the function
dedicated for this, tipc_own_addr().
There are no changes to program logics in this commit.
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/name_table.c')
-rw-r--r-- | net/tipc/name_table.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 7478acb39096..4359605b1bec 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -540,7 +540,7 @@ u32 tipc_nametbl_translate(struct net *net, u32 type, u32 instance, } /* Round-Robin Algorithm */ - else if (*destnode == tn->own_addr) { + else if (*destnode == tipc_own_addr(net)) { if (list_empty(&info->local_publ)) goto no_match; publ = list_first_entry(&info->local_publ, struct publication, @@ -713,7 +713,7 @@ struct publication *tipc_nametbl_publish(struct net *net, u32 type, u32 lower, } publ = tipc_nametbl_insert_publ(net, type, lower, upper, scope, - tn->own_addr, port_ref, key); + tipc_own_addr(net), port_ref, key); if (likely(publ)) { tn->nametbl->local_publ_count++; buf = tipc_named_publish(net, publ); @@ -738,7 +738,7 @@ int tipc_nametbl_withdraw(struct net *net, u32 type, u32 lower, u32 port, struct tipc_net *tn = net_generic(net, tipc_net_id); spin_lock_bh(&tn->nametbl_lock); - publ = tipc_nametbl_remove_publ(net, type, lower, tn->own_addr, + publ = tipc_nametbl_remove_publ(net, type, lower, tipc_own_addr(net), port, key); if (likely(publ)) { tn->nametbl->local_publ_count--; |