summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authornikolay@redhat.com <nikolay@redhat.com>2013-09-02 13:51:41 +0200
committerDavid S. Miller <davem@davemloft.net>2013-09-04 00:27:25 -0400
commit9b7b165ac1adf5169f0ee03d107423ce7f5805d9 (patch)
tree512e2289c33043c4741620d76bd97bbfbf4fdfdf /drivers/net/bonding/bond_main.c
parentc509316b5b33664b08b2a40d09534e0bd3c6b648 (diff)
downloadop-kernel-dev-9b7b165ac1adf5169f0ee03d107423ce7f5805d9.zip
op-kernel-dev-9b7b165ac1adf5169f0ee03d107423ce7f5805d9.tar.gz
bonding: drop read_lock in bond_fix_features
We're protected by RTNL so nothing can happen and we can safely drop the read bond->lock. Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 486e041..c5ebdc5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1084,18 +1084,16 @@ static void bond_netpoll_cleanup(struct net_device *bond_dev)
/*---------------------------------- IOCTL ----------------------------------*/
static netdev_features_t bond_fix_features(struct net_device *dev,
- netdev_features_t features)
+ netdev_features_t features)
{
- struct slave *slave;
struct bonding *bond = netdev_priv(dev);
netdev_features_t mask;
-
- read_lock(&bond->lock);
+ struct slave *slave;
if (list_empty(&bond->slave_list)) {
/* Disable adding VLANs to empty bond. But why? --mq */
features |= NETIF_F_VLAN_CHALLENGED;
- goto out;
+ return features;
}
mask = features;
@@ -1109,8 +1107,6 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
}
features = netdev_add_tso_features(features, mask);
-out:
- read_unlock(&bond->lock);
return features;
}
OpenPOWER on IntegriCloud