diff options
author | nikolay@redhat.com <nikolay@redhat.com> | 2013-09-02 07:51:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-09-04 00:27:25 -0400 |
commit | 9b7b165ac1adf5169f0ee03d107423ce7f5805d9 (patch) | |
tree | 512e2289c33043c4741620d76bd97bbfbf4fdfdf /drivers/net/bonding | |
parent | c509316b5b33664b08b2a40d09534e0bd3c6b648 (diff) |
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')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 486e04159bc3..c5ebdc57948f 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) | |||
1084 | /*---------------------------------- IOCTL ----------------------------------*/ | 1084 | /*---------------------------------- IOCTL ----------------------------------*/ |
1085 | 1085 | ||
1086 | static netdev_features_t bond_fix_features(struct net_device *dev, | 1086 | static netdev_features_t bond_fix_features(struct net_device *dev, |
1087 | netdev_features_t features) | 1087 | netdev_features_t features) |
1088 | { | 1088 | { |
1089 | struct slave *slave; | ||
1090 | struct bonding *bond = netdev_priv(dev); | 1089 | struct bonding *bond = netdev_priv(dev); |
1091 | netdev_features_t mask; | 1090 | netdev_features_t mask; |
1092 | 1091 | struct slave *slave; | |
1093 | read_lock(&bond->lock); | ||
1094 | 1092 | ||
1095 | if (list_empty(&bond->slave_list)) { | 1093 | if (list_empty(&bond->slave_list)) { |
1096 | /* Disable adding VLANs to empty bond. But why? --mq */ | 1094 | /* Disable adding VLANs to empty bond. But why? --mq */ |
1097 | features |= NETIF_F_VLAN_CHALLENGED; | 1095 | features |= NETIF_F_VLAN_CHALLENGED; |
1098 | goto out; | 1096 | return features; |
1099 | } | 1097 | } |
1100 | 1098 | ||
1101 | mask = features; | 1099 | mask = features; |
@@ -1109,8 +1107,6 @@ static netdev_features_t bond_fix_features(struct net_device *dev, | |||
1109 | } | 1107 | } |
1110 | features = netdev_add_tso_features(features, mask); | 1108 | features = netdev_add_tso_features(features, mask); |
1111 | 1109 | ||
1112 | out: | ||
1113 | read_unlock(&bond->lock); | ||
1114 | return features; | 1110 | return features; |
1115 | } | 1111 | } |
1116 | 1112 | ||