Re: [PATCH] rcu: convert uses of rcu_assign_pointer(x, NULL) toRCU_INIT_POINTER

From: David Miller
Date: Tue Aug 02 2011 - 01:44:23 EST


From: Stephen Hemminger <shemminger@xxxxxxxxxx>
Date: Mon, 1 Aug 2011 09:19:00 -0700

> When assigning a NULL value to an RCU protected pointer, no barrier
> is needed. The rcu_assign_pointer, used to handle that but will soon
> change to not handle the special case.
>
> Convert all rcu_assign_pointer of NULL value.
>
> //smpl
> @@ expression P; @@
>
> - rcu_assign_pointer(P, NULL)
> + RCU_INIT_POINTER(P, NULL)
>
> // </smpl>
>
>
> Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxx>

Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/