Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 945af1c3 authored by Allan Stephens's avatar Allan Stephens Committed by Paul Gortmaker
Browse files

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: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 97f1b625
Loading
Loading
Loading
Loading
+5 −7
Original line number Original line Diff line number Diff line
@@ -322,10 +322,9 @@ void tipc_named_recv(struct sk_buff *buf)
/**
/**
 * tipc_named_reinit - re-initialize local publication list
 * 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
 * All existing publications by this node that have "cluster" or "zone" scope
 * are updated to reflect the node's current network address.
 * are updated to reflect the node's new network address.
 * (If the node's address is unchanged, the update loop terminates immediately.)
 */
 */


void tipc_named_reinit(void)
void tipc_named_reinit(void)
@@ -333,10 +332,9 @@ void tipc_named_reinit(void)
	struct publication *publ;
	struct publication *publ;


	write_lock_bh(&tipc_nametbl_lock);
	write_lock_bh(&tipc_nametbl_lock);
	list_for_each_entry(publ, &publ_root, local_list) {

		if (publ->node == tipc_own_addr)
	list_for_each_entry(publ, &publ_root, local_list)
			break;
		publ->node = tipc_own_addr;
		publ->node = tipc_own_addr;
	}

	write_unlock_bh(&tipc_nametbl_lock);
	write_unlock_bh(&tipc_nametbl_lock);
}
}