aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2013-06-17 10:54:49 -0400
committerDavid S. Miller <davem@davemloft.net>2013-06-17 18:53:01 -0400
commit7410f967ba9bdc14b1e336e5d235929ed878cbfc (patch)
tree848f66440d17c545cdb04207500001fbbac9089f /net/tipc
parent796c75d0d3ef13cd1df00779abb8b27edb630504 (diff)
tipc: make tipc_link_send_sections_fast exit earlier
Once message build request function returns invalid code, the process of sending message cannot continue. So in case of message build failure, tipc_link_send_sections_fast() should return immediately. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index b6de1aa059f4..b6ffa9fab244 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1082,6 +1082,9 @@ again:
1082 */ 1082 */
1083 res = tipc_msg_build(hdr, msg_sect, num_sect, total_len, 1083 res = tipc_msg_build(hdr, msg_sect, num_sect, total_len,
1084 sender->max_pkt, &buf); 1084 sender->max_pkt, &buf);
1085 /* Exit if build request was invalid */
1086 if (unlikely(res < 0))
1087 return res;
1085 1088
1086 read_lock_bh(&tipc_net_lock); 1089 read_lock_bh(&tipc_net_lock);
1087 node = tipc_node_find(destaddr); 1090 node = tipc_node_find(destaddr);
@@ -1098,10 +1101,6 @@ exit:
1098 return res; 1101 return res;
1099 } 1102 }
1100 1103
1101 /* Exit if build request was invalid */
1102 if (unlikely(res < 0))
1103 goto exit;
1104
1105 /* Exit if link (or bearer) is congested */ 1104 /* Exit if link (or bearer) is congested */
1106 if (link_congested(l_ptr) || 1105 if (link_congested(l_ptr) ||
1107 tipc_bearer_blocked(l_ptr->b_ptr)) { 1106 tipc_bearer_blocked(l_ptr->b_ptr)) {