summaryrefslogtreecommitdiffstats
path: root/net/tipc/name_distr.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-14 14:42:25 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:46 -0500
commit945af1c39df00a1e5873e38145432ba752ec49a0 (patch)
tree4fecb46c23a92b3635eb1db071b4e08edbe9fe86 /net/tipc/name_distr.c
parent97f1b625d133b44d38b8b55ec2cbe35d7ef94f3a (diff)
downloadop-kernel-dev-945af1c39df00a1e5873e38145432ba752ec49a0.zip
op-kernel-dev-945af1c39df00a1e5873e38145432ba752ec49a0.tar.gz
tipc: Eliminate useless check when network address is assigned
Gets rid of an unnecessary check in the routine that updates the port id of a node's name publications when the node is assigned a network address, since the routine is only invoked if the new address is different from the existing one. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/name_distr.c')
-rw-r--r--net/tipc/name_distr.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index b7ca1bd..be8306f 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -322,10 +322,9 @@ void tipc_named_recv(struct sk_buff *buf)
/**
* tipc_named_reinit - re-initialize local publication list
*
- * This routine is called whenever TIPC networking is (re)enabled.
+ * This routine is called whenever TIPC networking is enabled.
* All existing publications by this node that have "cluster" or "zone" scope
- * are updated to reflect the node's current network address.
- * (If the node's address is unchanged, the update loop terminates immediately.)
+ * are updated to reflect the node's new network address.
*/
void tipc_named_reinit(void)
@@ -333,10 +332,9 @@ void tipc_named_reinit(void)
struct publication *publ;
write_lock_bh(&tipc_nametbl_lock);
- list_for_each_entry(publ, &publ_root, local_list) {
- if (publ->node == tipc_own_addr)
- break;
+
+ list_for_each_entry(publ, &publ_root, local_list)
publ->node = tipc_own_addr;
- }
+
write_unlock_bh(&tipc_nametbl_lock);
}
OpenPOWER on IntegriCloud