epoll: cleanup: use RCU_INIT_POINTER when nulling
authorEric Wong <normalperson@yhbt.net>
Tue, 30 Apr 2013 22:27:43 +0000 (15:27 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 May 2013 00:04:04 +0000 (17:04 -0700)
It is always safe to use RCU_INIT_POINTER to NULL a pointer.  This results
in slightly smaller/faster code.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/eventpoll.c

index c5d9880b5fcffb8636a0edf33b1b071990553c39..277cc38aeda5eb9b49f951cfd6d0bcf01520fbb9 100644 (file)
@@ -1213,7 +1213,7 @@ static noinline void ep_destroy_wakeup_source(struct epitem *epi)
 {
        struct wakeup_source *ws = ep_wakeup_source(epi);
 
-       rcu_assign_pointer(epi->ws, NULL);
+       RCU_INIT_POINTER(epi->ws, NULL);
 
        /*
         * wait for ep_pm_stay_awake_rcu to finish, synchronize_rcu is