Skip to content

Commit 8670499

Browse files
Hoang Ledavem330
authored andcommitted
Revert "tipc: Return the correct errno code"
This reverts commit 0efea3c because of: - The returning -ENOBUF error is fine on socket buffer allocation. - There is side effect in the calling path tipc_node_xmit()->tipc_link_xmit() when checking error code returning. Fixes: 0efea3c ("tipc: Return the correct errno code") Acked-by: Jon Maloy <jmaloy@redhat.com> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 48c812e commit 8670499

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

net/tipc/link.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr)
913913
skb = tipc_msg_create(SOCK_WAKEUP, 0, INT_H_SIZE, 0,
914914
dnode, l->addr, dport, 0, 0);
915915
if (!skb)
916-
return -ENOMEM;
916+
return -ENOBUFS;
917917
msg_set_dest_droppable(buf_msg(skb), true);
918918
TIPC_SKB_CB(skb)->chain_imp = msg_importance(hdr);
919919
skb_queue_tail(&l->wakeupq, skb);
@@ -1031,7 +1031,7 @@ void tipc_link_reset(struct tipc_link *l)
10311031
*
10321032
* Consumes the buffer chain.
10331033
* Messages at TIPC_SYSTEM_IMPORTANCE are always accepted
1034-
* Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS or -ENOMEM
1034+
* Return: 0 if success, or errno: -ELINKCONG, -EMSGSIZE or -ENOBUFS
10351035
*/
10361036
int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
10371037
struct sk_buff_head *xmitq)
@@ -1089,7 +1089,7 @@ int tipc_link_xmit(struct tipc_link *l, struct sk_buff_head *list,
10891089
if (!_skb) {
10901090
kfree_skb(skb);
10911091
__skb_queue_purge(list);
1092-
return -ENOMEM;
1092+
return -ENOBUFS;
10931093
}
10941094
__skb_queue_tail(transmq, skb);
10951095
tipc_link_set_skb_retransmit_time(skb, l);

0 commit comments

Comments
 (0)