summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authordingtianhong2013-12-13 03:19:32 +0100
committerDavid S. Miller2013-12-14 07:58:01 +0100
commitb2e7aceb00b2621431e220748f7158b131b89e7b (patch)
tree2f2a187827d9203946d12877971479bac4c8dff0 /net/core
parentpkt_sched: set root qdisc before change() in attach_default_qdiscs() (diff)
downloadkernel-qcow2-linux-b2e7aceb00b2621431e220748f7158b131b89e7b.tar.gz
kernel-qcow2-linux-b2e7aceb00b2621431e220748f7158b131b89e7b.tar.xz
kernel-qcow2-linux-b2e7aceb00b2621431e220748f7158b131b89e7b.zip
bonding: remove the no effect lock for bond_select_active_slave()
The bond slave list was no longer protected by bond lock and only protected by RTNL or RCU, so anywhere that use bond lock to protect slave list is meaningless. remove the release and acquire bond lock for bond_select_active_slave(). The curr_active_slave could only be changed in 3 place: 1. enslave slave. 2. release slave. 3. change_active_slave. all above place were holding bond lock, RTNL and curr_slave_lock together, it is tedious and meaningless, obviously bond lock is no need here, but RTNL or curr_slave_lock is needed, so if you want to access active slave, you have to choose one lock, RTNL or curr_slave_lock, if RTNL is exist, no need to add curr_slave_lock, otherwise curr_slave_lock is better, because of the performance. there are several place calling bond_select_active_slave() and bond_change_active_slave(), the next step I will clean these place and remove the no effect lock. there are some document changed together when update the function. Suggested-by: Jay Vosburgh <fubar@us.ibm.com> Suggested-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
0 files changed, 0 insertions, 0 deletions