diff options
Diffstat (limited to 'net/tipc/name_table.c')
| -rw-r--r-- | net/tipc/name_table.c | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 88f027b502f6..bff241f03525 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c @@ -744,6 +744,7 @@ int tipc_nametbl_init(struct net *net)  	INIT_LIST_HEAD(&nt->node_scope);  	INIT_LIST_HEAD(&nt->cluster_scope); +	rwlock_init(&nt->cluster_scope_lock);  	tn->nametbl = nt;  	spin_lock_init(&tn->nametbl_lock);  	return 0; @@ -980,20 +981,17 @@ int tipc_nl_name_table_dump(struct sk_buff *skb, struct netlink_callback *cb)  struct tipc_dest *tipc_dest_find(struct list_head *l, u32 node, u32 port)  { -	u64 value = (u64)node << 32 | port;  	struct tipc_dest *dst;  	list_for_each_entry(dst, l, list) { -		if (dst->value != value) -			continue; -		return dst; +		if (dst->node == node && dst->port == port) +			return dst;  	}  	return NULL;  }  bool tipc_dest_push(struct list_head *l, u32 node, u32 port)  { -	u64 value = (u64)node << 32 | port;  	struct tipc_dest *dst;  	if (tipc_dest_find(l, node, port)) @@ -1002,7 +1000,8 @@ bool tipc_dest_push(struct list_head *l, u32 node, u32 port)  	dst = kmalloc(sizeof(*dst), GFP_ATOMIC);  	if (unlikely(!dst))  		return false; -	dst->value = value; +	dst->node = node; +	dst->port = port;  	list_add(&dst->list, l);  	return true;  } |