diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/bcast.c | 4 | ||||
-rw-r--r-- | net/tipc/link.c | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index 08e3216a33d2..fa68d1e9ff4b 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
@@ -407,9 +407,7 @@ int tipc_bclink_send_msg(struct sk_buff *buf) | |||
407 | spin_lock_bh(&bc_lock); | 407 | spin_lock_bh(&bc_lock); |
408 | 408 | ||
409 | res = tipc_link_send_buf(bcl, buf); | 409 | res = tipc_link_send_buf(bcl, buf); |
410 | if (unlikely(res == -ELINKCONG)) | 410 | if (likely(res > 0)) |
411 | buf_discard(buf); | ||
412 | else | ||
413 | bclink_set_last_sent(); | 411 | bclink_set_last_sent(); |
414 | 412 | ||
415 | bcl->stats.queue_sz_counts++; | 413 | bcl->stats.queue_sz_counts++; |
diff --git a/net/tipc/link.c b/net/tipc/link.c index 02b083e5c219..2a9f44a203eb 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -864,8 +864,9 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
864 | 864 | ||
865 | if (unlikely(queue_size >= queue_limit)) { | 865 | if (unlikely(queue_size >= queue_limit)) { |
866 | if (imp <= TIPC_CRITICAL_IMPORTANCE) { | 866 | if (imp <= TIPC_CRITICAL_IMPORTANCE) { |
867 | return link_schedule_port(l_ptr, msg_origport(msg), | 867 | link_schedule_port(l_ptr, msg_origport(msg), size); |
868 | size); | 868 | buf_discard(buf); |
869 | return -ELINKCONG; | ||
869 | } | 870 | } |
870 | buf_discard(buf); | 871 | buf_discard(buf); |
871 | if (imp > CONN_MANAGER) { | 872 | if (imp > CONN_MANAGER) { |
@@ -1069,8 +1070,6 @@ again: | |||
1069 | if (likely(buf)) { | 1070 | if (likely(buf)) { |
1070 | res = link_send_buf_fast(l_ptr, buf, | 1071 | res = link_send_buf_fast(l_ptr, buf, |
1071 | &sender->max_pkt); | 1072 | &sender->max_pkt); |
1072 | if (unlikely(res < 0)) | ||
1073 | buf_discard(buf); | ||
1074 | exit: | 1073 | exit: |
1075 | tipc_node_unlock(node); | 1074 | tipc_node_unlock(node); |
1076 | read_unlock_bh(&tipc_net_lock); | 1075 | read_unlock_bh(&tipc_net_lock); |