From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ding Tianhong Subject: [PATCH net-next v4 2/6] bonding: remove the no effect lock for bond_3ad_lacpdu_recv() Date: Fri, 6 Sep 2013 15:28:11 +0800 Message-ID: <5229840B.2060707@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit To: Jay Vosburgh , Andy Gospodarek , "David S. Miller" , Nikolay Aleksandrov , Veaceslav Falico , Netdev Return-path: Received: from szxga01-in.huawei.com ([119.145.14.64]:24803 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866Ab3IFH2f (ORCPT ); Fri, 6 Sep 2013 03:28:35 -0400 Sender: netdev-owner@vger.kernel.org List-ID: There is no pointer needed read lock protection, remove the unnecessary lock and improve performance for the 3ad recv path. Signed-off-by: Ding Tianhong Cc: Nikolay Aleksandrov --- drivers/net/bonding/bond_3ad.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index 7a3860f..c134f43 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -2494,9 +2494,7 @@ int bond_3ad_lacpdu_recv(const struct sk_buff *skb, struct bonding *bond, if (!lacpdu) return ret; - read_lock(&bond->lock); ret = bond_3ad_rx_indication(lacpdu, slave, skb->len); - read_unlock(&bond->lock); return ret; } -- 1.8.2.1