From: Monam Agarwal Date: Mon, 7 Apr 2014 22:38:35 +0000 (-0700) Subject: fs/proc/inode.c: use RCU_INIT_POINTER(x, NULL) X-Git-Tag: v4.0~2074^2~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c44dbc82f75aabc5de95da92b304393a94751fc;p=platform%2Fkernel%2Flinux-amlogic.git fs/proc/inode.c: use RCU_INIT_POINTER(x, NULL) Replace rcu_assign_pointer(x, NULL) with RCU_INIT_POINTER(x, NULL) The rcu_assign_pointer() ensures that the initialization of a structure is carried out before storing a pointer to that structure. And in the case of the NULL pointer, there is no structure to initialize. So, rcu_assign_pointer(p, NULL) can be safely converted to RCU_INIT_POINTER(p, NULL) Signed-off-by: Monam Agarwal Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 8f20e34..0adbc02 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -47,7 +47,7 @@ static void proc_evict_inode(struct inode *inode) pde_put(de); head = PROC_I(inode)->sysctl; if (head) { - rcu_assign_pointer(PROC_I(inode)->sysctl, NULL); + RCU_INIT_POINTER(PROC_I(inode)->sysctl, NULL); sysctl_head_put(head); } /* Release any associated namespace */