aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-12-09 18:19:53 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-12-12 15:19:17 -0500
commit36708b89e00951b004b4dd6c14181301e2e98354 (patch)
tree02a868b14e89182dd4a59fe66143bdc194803687
parentac7c8e3dd2ed6489be1f6bc722029fb4855c3a34 (diff)
bonding: Use RCU_INIT_POINTER() for better overhead and for sparse
Although rcu_assign_pointer() can be used to assign a constant NULL pointer, doing so gets you an unnecessary memory barrier and in some circumstances, sparse warnings. This commit therefore changes the rcu_assign_pointer() of NULL in __bond_release_one() to RCU_INIT_POINTER(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
-rw-r--r--drivers/net/bonding/bond_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 4dd5ee2a34cc..a0b97c4c655d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1763,7 +1763,7 @@ static int __bond_release_one(struct net_device *bond_dev,
1763 } 1763 }
1764 1764
1765 if (all) { 1765 if (all) {
1766 rcu_assign_pointer(bond->curr_active_slave, NULL); 1766 RCU_INIT_POINTER(bond->curr_active_slave, NULL);
1767 } else if (oldcurrent == slave) { 1767 } else if (oldcurrent == slave) {
1768 /* 1768 /*
1769 * Note that we hold RTNL over this sequence, so there 1769 * Note that we hold RTNL over this sequence, so there