* [PATCH -mm] epoll: cleanup: use RCU_INIT_POINTER when nulling
@ 2013-03-28 19:46 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2013-03-28 19:46 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
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>
Cc: Andrew Morton <akpm@linux-foundation.org>
---
Andrew: Sorry for the noise and requiring these cleanups. Would you
want a squashed commit with all my RCU+ws-related epoll changes to keep
history cleaner? I will try to be more careful and require less
followup patches in the future :x
fs/eventpoll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index dcf7906..1295d3a 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1207,7 +1207,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
--
Eric Wong
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-03-28 19:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-28 19:46 [PATCH -mm] epoll: cleanup: use RCU_INIT_POINTER when nulling Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®