diff options
author | Nikolay Aleksandrov <nikolay@redhat.com> | 2014-09-09 23:17:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-09 17:31:36 -0700 |
commit | 87163ef9cda7617f8afdb549de191706641003c0 (patch) | |
tree | 597c6a74e401afdb18686a3ccf71abc46fc21cbf /drivers/net/bonding/bonding.h | |
parent | 246df7b423aa61a8bd0b58404759a9abb4c15081 (diff) |
bonding: remove last users of bond->lock and bond->lock itself
The usage of bond->lock in bond_main.c was completely unnecessary as it
didn't help to sync with anything, most of the spots already had RTNL.
Since there're no more users of bond->lock, remove it.
Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index c798561a6f01..78c461abaa09 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h @@ -83,7 +83,7 @@ * @pos: current slave * @iter: list_head * iterator * - * Caller must hold bond->lock + * Caller must hold RTNL */ #define bond_for_each_slave(bond, pos, iter) \ netdev_for_each_lower_private((bond)->dev, pos, iter) @@ -185,11 +185,8 @@ struct slave { /* * Here are the locking policies for the two bonding locks: * - * 1) Get bond->lock when reading/writing slave list. + * 1) Get rcu_read_lock when reading or RTNL when writing slave list. * 2) Get bond->curr_slave_lock when reading/writing bond->curr_active_slave. - * (It is unnecessary when the write-lock is put with bond->lock.) - * 3) When we lock with bond->curr_slave_lock, we must lock with bond->lock - * beforehand. */ struct bonding { struct net_device *dev; /* first - useful for panic debug */ @@ -200,7 +197,6 @@ struct bonding { s32 slave_cnt; /* never change this value outside the attach/detach wrappers */ int (*recv_probe)(const struct sk_buff *, struct bonding *, struct slave *); - rwlock_t lock; rwlock_t curr_slave_lock; u8 send_peer_notif; u8 igmp_retrans; |