提交 a7513528 编写于 作者: A Allan Stephens 提交者: David S. Miller

[TIPC]: Withdrawing all names from nameless port now returns success, not error

Signed-off-by: NAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: NPer Liden <per.liden@ericsson.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 51f9cc1f
...@@ -1171,8 +1171,6 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) ...@@ -1171,8 +1171,6 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
p_ptr = tipc_port_lock(ref); p_ptr = tipc_port_lock(ref);
if (!p_ptr) if (!p_ptr)
return -EINVAL; return -EINVAL;
if (!p_ptr->publ.published)
goto exit;
if (!seq) { if (!seq) {
list_for_each_entry_safe(publ, tpubl, list_for_each_entry_safe(publ, tpubl,
&p_ptr->publications, pport_list) { &p_ptr->publications, pport_list) {
...@@ -1199,7 +1197,6 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq) ...@@ -1199,7 +1197,6 @@ int tipc_withdraw(u32 ref, unsigned int scope, struct tipc_name_seq const *seq)
} }
if (list_empty(&p_ptr->publications)) if (list_empty(&p_ptr->publications))
p_ptr->publ.published = 0; p_ptr->publ.published = 0;
exit:
tipc_port_unlock(p_ptr); tipc_port_unlock(p_ptr);
return res; return res;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册