Skip to content

Commit

Permalink
epoll: cleanup: use RCU_INIT_POINTER when nulling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Wong authored and torvalds committed May 1, 2013
1 parent 450d89e commit d6d67e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/eventpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6d67e7

Please sign in to comment.