net: treewide use of RCU_INIT_POINTER
rcu_assign_pointer(ptr, NULL) can be safely replaced by RCU_INIT_POINTER(ptr, NULL) (old rcu_assign_pointer() macro was testing the NULL value and could omit the smp_wmb(), but this had to be removed because of compiler warnings) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
8c2152286a
commit
2cfa5a0471
@@ -409,7 +409,7 @@ static int bnx2_unregister_cnic(struct net_device *dev)
|
||||
mutex_lock(&bp->cnic_lock);
|
||||
cp->drv_state = 0;
|
||||
bnapi->cnic_present = 0;
|
||||
rcu_assign_pointer(bp->cnic_ops, NULL);
|
||||
RCU_INIT_POINTER(bp->cnic_ops, NULL);
|
||||
mutex_unlock(&bp->cnic_lock);
|
||||
synchronize_rcu();
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user