Skip to content

Commit d6d67e7

Browse files
Eric Wongtorvalds
Eric Wong
authored andcommitted
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: Eric Wong <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 450d89e commit d6d67e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/eventpoll.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,7 @@ static noinline void ep_destroy_wakeup_source(struct epitem *epi)
12131213
{
12141214
struct wakeup_source *ws = ep_wakeup_source(epi);
12151215

1216-
rcu_assign_pointer(epi->ws, NULL);
1216+
RCU_INIT_POINTER(epi->ws, NULL);
12171217

12181218
/*
12191219
* wait for ep_pm_stay_awake_rcu to finish, synchronize_rcu is

0 commit comments

Comments
 (0)