Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6d67e72 authored by Eric Wong's avatar Eric Wong Committed by Linus Torvalds
Browse files

epoll: cleanup: use RCU_INIT_POINTER when nulling



It is always safe to use RCU_INIT_POINTER to NULL a pointer.  This results
in slightly smaller/faster code.

Signed-off-by: default avatarEric Wong <normalperson@yhbt.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 450d89ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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