Commit 9b7b165a authored by nikolay@redhat.com's avatar nikolay@redhat.com Committed by David S. Miller

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: default avatarNikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c509316b
...@@ -1086,16 +1086,14 @@ static void bond_netpoll_cleanup(struct net_device *bond_dev) ...@@ -1086,16 +1086,14 @@ static void bond_netpoll_cleanup(struct net_device *bond_dev)
static netdev_features_t bond_fix_features(struct net_device *dev, 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); struct bonding *bond = netdev_priv(dev);
netdev_features_t mask; netdev_features_t mask;
struct slave *slave;
read_lock(&bond->lock);
if (list_empty(&bond->slave_list)) { if (list_empty(&bond->slave_list)) {
/* Disable adding VLANs to empty bond. But why? --mq */ /* Disable adding VLANs to empty bond. But why? --mq */
features |= NETIF_F_VLAN_CHALLENGED; features |= NETIF_F_VLAN_CHALLENGED;
goto out; return features;
} }
mask = features; mask = features;
...@@ -1109,8 +1107,6 @@ static netdev_features_t bond_fix_features(struct net_device *dev, ...@@ -1109,8 +1107,6 @@ static netdev_features_t bond_fix_features(struct net_device *dev,
} }
features = netdev_add_tso_features(features, mask); features = netdev_add_tso_features(features, mask);
out:
read_unlock(&bond->lock);
return features; return features;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment