[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1371480891-5264-15-git-send-email-paul.gortmaker@windriver.com>
Date: Mon, 17 Jun 2013 10:54:49 -0400
From: Paul Gortmaker <paul.gortmaker@...driver.com>
To: David Miller <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, Jon Maloy <jon.maloy@...csson.com>,
Ying Xue <ying.xue@...driver.com>,
Erik Hugne <erik.hugne@...csson.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [PATCH net-next 14/16] tipc: make tipc_link_send_sections_fast exit earlier
From: Ying Xue <ying.xue@...driver.com>
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@...driver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
net/tipc/link.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/tipc/link.c b/net/tipc/link.c
index b6de1aa..b6ffa9f 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)) {
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists