diff options
author | Ying Xue <ying.xue@windriver.com> | 2013-06-17 16:54:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-18 00:53:01 +0200 |
commit | 7410f967ba9bdc14b1e336e5d235929ed878cbfc (patch) | |
tree | 848f66440d17c545cdb04207500001fbbac9089f /net/tipc | |
parent | tipc: enhance priority of link protocol packet (diff) | |
download | linux-7410f967ba9bdc14b1e336e5d235929ed878cbfc.tar.xz linux-7410f967ba9bdc14b1e336e5d235929ed878cbfc.zip |
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.c | 7 |
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: */ res = tipc_msg_build(hdr, msg_sect, num_sect, total_len, sender->max_pkt, &buf); + /* Exit if build request was invalid */ + if (unlikely(res < 0)) + return res; read_lock_bh(&tipc_net_lock); node = tipc_node_find(destaddr); @@ -1098,10 +1101,6 @@ exit: return res; } - /* Exit if build request was invalid */ - if (unlikely(res < 0)) - goto exit; - /* Exit if link (or bearer) is congested */ if (link_congested(l_ptr) || tipc_bearer_blocked(l_ptr->b_ptr)) { |