Message ID | 526FACA9.9020004@ericsson.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
> continue; > + > +unlock: > + tipc_node_unlock(n_ptr); > cont: > kfree_skb(buf); > } Might be better to call the labels 'unlock_discard' and 'discard'. David -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/29/2013 08:42 PM, David Laight wrote: >> continue; >> + >> +unlock: >> + tipc_node_unlock(n_ptr); >> cont: >> kfree_skb(buf); >> } > > Might be better to call the labels 'unlock_discard' and 'discard'. > Thanks for your valuable suggestions. I will submit next version soon. Regards, Ying > David > > > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- link.c-old 2013-10-29 13:34:35.804926348 +0100 +++ link.c 2013-10-29 13:39:23.991842809 +0100 @@ -1541,10 +1541,8 @@ /* Locate unicast link endpoint that should handle message */ l_ptr = n_ptr->links[b_ptr->identity]; - if (unlikely(!l_ptr)) { - tipc_node_unlock(n_ptr); - goto cont; - } + if (unlikely(!l_ptr)) + goto unlock; /* Verify that communication with node is currently allowed */ if ((n_ptr->block_setup & WAIT_PEER_DOWN) && @@ -1554,10 +1552,8 @@ !msg_redundant_link(msg)) n_ptr->block_setup &= ~WAIT_PEER_DOWN; - if (n_ptr->block_setup) { - tipc_node_unlock(n_ptr); - goto cont; - } + if (n_ptr->block_setup) + goto unlock; /* Validate message sequence number info */ seq_no = msg_seqno(msg); @@ -1611,8 +1607,7 @@ tipc_node_unlock(n_ptr); continue; } - tipc_node_unlock(n_ptr); - goto cont; + goto unlock; } /* Link is now in state WORKING_WORKING */ @@ -1681,6 +1676,9 @@ tipc_node_unlock(n_ptr); tipc_net_route_msg(buf); continue; + +unlock: + tipc_node_unlock(n_ptr); cont: kfree_skb(buf); }