From patchwork Wed Nov 6 06:53:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 288735 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 752312C00C8 for ; Wed, 6 Nov 2013 17:54:40 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753430Ab3KFGyg (ORCPT ); Wed, 6 Nov 2013 01:54:36 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:59334 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568Ab3KFGyf (ORCPT ); Wed, 6 Nov 2013 01:54:35 -0500 Received: from 172.24.2.119 (EHLO szxeml207-edg.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BKV36322; Wed, 06 Nov 2013 14:53:58 +0800 (CST) Received: from SZXEML414-HUB.china.huawei.com (10.82.67.153) by szxeml207-edg.china.huawei.com (172.24.2.56) with Microsoft SMTP Server (TLS) id 14.3.158.1; Wed, 6 Nov 2013 14:53:06 +0800 Received: from [127.0.0.1] (10.135.72.199) by SZXEML414-HUB.china.huawei.com (10.82.67.153) with Microsoft SMTP Server id 14.3.158.1; Wed, 6 Nov 2013 14:53:05 +0800 Message-ID: <5279E750.8060400@huawei.com> Date: Wed, 6 Nov 2013 14:53:04 +0800 From: Ding Tianhong User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Jay Vosburgh , Andy Gospodarek , "David S. Miller" , Nikolay Aleksandrov , Veaceslav Falico , Netdev Subject: [PATCH net-next 7/9] bonding: remove unwanted lock for bond_option_active_slave_set() X-Originating-IP: [10.135.72.199] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The bond_option_active_slave_set() is always in RTNL, bond lock and curr_slave_lock is no longer need here, so remove it to clean the function. Signed-off-by: Ding Tianhong --- drivers/net/bonding/bond_options.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/bonding/bond_options.c b/drivers/net/bonding/bond_options.c index 9a5223c..7694343 100644 --- a/drivers/net/bonding/bond_options.c +++ b/drivers/net/bonding/bond_options.c @@ -101,8 +101,6 @@ int bond_option_active_slave_set(struct bonding *bond, } block_netpoll_tx(); - read_lock(&bond->lock); - write_lock_bh(&bond->curr_slave_lock); /* check to see if we are clearing active */ if (!slave_dev) { @@ -135,8 +133,6 @@ int bond_option_active_slave_set(struct bonding *bond, } } - write_unlock_bh(&bond->curr_slave_lock); - read_unlock(&bond->lock); unblock_netpoll_tx(); return ret; }