mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
tipc: remove some unnecessary warnings
We move some warning printouts to more strategic locations to avoid duplicates and yield more detailed information about the reported problem. Signed-off-by: Jon Maloy <jmaloy@redhat.com> Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Hoang Le <hoang.h.le@dektech.com.au> Acked-by: Tung Nguyen <tung.q.nguyen@dektech.com.au> Acked-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
429189acac
commit
5c8349503d
2 changed files with 16 additions and 21 deletions
|
@ -253,13 +253,6 @@ static void tipc_publ_purge(struct net *net, struct publication *p, u32 addr)
|
||||||
if (_p)
|
if (_p)
|
||||||
tipc_node_unsubscribe(net, &_p->binding_node, addr);
|
tipc_node_unsubscribe(net, &_p->binding_node, addr);
|
||||||
spin_unlock_bh(&tn->nametbl_lock);
|
spin_unlock_bh(&tn->nametbl_lock);
|
||||||
|
|
||||||
if (_p != p) {
|
|
||||||
pr_err("Unable to remove publication from failed node\n"
|
|
||||||
" (type=%u, lower=%u, node=%u, port=%u, key=%u)\n",
|
|
||||||
p->sr.type, p->sr.lower, p->sk.node, p->sk.ref, p->key);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_p)
|
if (_p)
|
||||||
kfree_rcu(_p, rcu);
|
kfree_rcu(_p, rcu);
|
||||||
}
|
}
|
||||||
|
|
|
@ -337,6 +337,7 @@ static bool tipc_service_insert_publ(struct net *net,
|
||||||
u32 node = p->sk.node;
|
u32 node = p->sk.node;
|
||||||
bool first = false;
|
bool first = false;
|
||||||
bool res = false;
|
bool res = false;
|
||||||
|
u32 key = p->key;
|
||||||
|
|
||||||
spin_lock_bh(&sc->lock);
|
spin_lock_bh(&sc->lock);
|
||||||
sr = tipc_service_create_range(sc, p);
|
sr = tipc_service_create_range(sc, p);
|
||||||
|
@ -347,9 +348,13 @@ static bool tipc_service_insert_publ(struct net *net,
|
||||||
|
|
||||||
/* Return if the publication already exists */
|
/* Return if the publication already exists */
|
||||||
list_for_each_entry(_p, &sr->all_publ, all_publ) {
|
list_for_each_entry(_p, &sr->all_publ, all_publ) {
|
||||||
if (_p->key == p->key && (!_p->sk.node || _p->sk.node == node))
|
if (_p->key == key && (!_p->sk.node || _p->sk.node == node)) {
|
||||||
|
pr_debug("Failed to bind duplicate %u,%u,%u/%u:%u/%u\n",
|
||||||
|
p->sr.type, p->sr.lower, p->sr.upper,
|
||||||
|
node, p->sk.ref, key);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (in_own_node(net, p->sk.node))
|
if (in_own_node(net, p->sk.node))
|
||||||
list_add(&p->local_publ, &sr->local_publ);
|
list_add(&p->local_publ, &sr->local_publ);
|
||||||
|
@ -475,17 +480,11 @@ struct publication *tipc_nametbl_insert_publ(struct net *net,
|
||||||
{
|
{
|
||||||
struct tipc_service *sc;
|
struct tipc_service *sc;
|
||||||
struct publication *p;
|
struct publication *p;
|
||||||
u32 type = ua->sr.type;
|
|
||||||
|
|
||||||
p = tipc_publ_create(ua, sk, key);
|
p = tipc_publ_create(ua, sk, key);
|
||||||
if (!p)
|
if (!p)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (ua->sr.lower > ua->sr.upper) {
|
|
||||||
pr_debug("Failed to bind illegal {%u,%u,%u} from node %u\n",
|
|
||||||
type, ua->sr.lower, ua->sr.upper, sk->node);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
sc = tipc_service_find(net, ua);
|
sc = tipc_service_find(net, ua);
|
||||||
if (!sc)
|
if (!sc)
|
||||||
sc = tipc_service_create(net, ua);
|
sc = tipc_service_create(net, ua);
|
||||||
|
@ -508,15 +507,15 @@ struct publication *tipc_nametbl_remove_publ(struct net *net,
|
||||||
|
|
||||||
sc = tipc_service_find(net, ua);
|
sc = tipc_service_find(net, ua);
|
||||||
if (!sc)
|
if (!sc)
|
||||||
return NULL;
|
goto exit;
|
||||||
|
|
||||||
spin_lock_bh(&sc->lock);
|
spin_lock_bh(&sc->lock);
|
||||||
sr = tipc_service_find_range(sc, ua);
|
sr = tipc_service_find_range(sc, ua);
|
||||||
if (!sr)
|
if (!sr)
|
||||||
goto exit;
|
goto unlock;
|
||||||
p = tipc_service_remove_publ(sr, sk, key);
|
p = tipc_service_remove_publ(sr, sk, key);
|
||||||
if (!p)
|
if (!p)
|
||||||
goto exit;
|
goto unlock;
|
||||||
|
|
||||||
/* Notify any waiting subscriptions */
|
/* Notify any waiting subscriptions */
|
||||||
last = list_empty(&sr->all_publ);
|
last = list_empty(&sr->all_publ);
|
||||||
|
@ -535,8 +534,14 @@ struct publication *tipc_nametbl_remove_publ(struct net *net,
|
||||||
hlist_del_init_rcu(&sc->service_list);
|
hlist_del_init_rcu(&sc->service_list);
|
||||||
kfree_rcu(sc, rcu);
|
kfree_rcu(sc, rcu);
|
||||||
}
|
}
|
||||||
exit:
|
unlock:
|
||||||
spin_unlock_bh(&sc->lock);
|
spin_unlock_bh(&sc->lock);
|
||||||
|
exit:
|
||||||
|
if (!p) {
|
||||||
|
pr_err("Failed to remove unknown binding: %u,%u,%u/%u:%u/%u\n",
|
||||||
|
ua->sr.type, ua->sr.lower, ua->sr.upper,
|
||||||
|
sk->node, sk->ref, key);
|
||||||
|
}
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -805,9 +810,6 @@ void tipc_nametbl_withdraw(struct net *net, struct tipc_uaddr *ua,
|
||||||
skb = tipc_named_withdraw(net, p);
|
skb = tipc_named_withdraw(net, p);
|
||||||
list_del_init(&p->binding_sock);
|
list_del_init(&p->binding_sock);
|
||||||
kfree_rcu(p, rcu);
|
kfree_rcu(p, rcu);
|
||||||
} else {
|
|
||||||
pr_err("Failed to remove local publication {%u,%u,%u}/%u\n",
|
|
||||||
ua->sr.type, ua->sr.lower, ua->sr.upper, key);
|
|
||||||
}
|
}
|
||||||
rc_dests = nt->rc_dests;
|
rc_dests = nt->rc_dests;
|
||||||
spin_unlock_bh(&tn->nametbl_lock);
|
spin_unlock_bh(&tn->nametbl_lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue