]> git.baikalelectronics.ru Git - kernel.git/commit
afs: inode: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
authorAndreea-Cristina Bernat <bernat.ada@gmail.com>
Thu, 16 Mar 2017 16:27:45 +0000 (16:27 +0000)
committerDavid Howells <dhowells@redhat.com>
Thu, 16 Mar 2017 16:27:45 +0000 (16:27 +0000)
commitbf6c858ae1a6e6911ea07bb63e8f18163ccf1ab4
treea4b2f6323bdcb246dd921905df7a54ffb818ac14
parent6468bdb18c33f3f3808099e883ce6737561fca2f
afs: inode: Replace rcu_assign_pointer() with RCU_INIT_POINTER()

The use of "rcu_assign_pointer()" is NULLing out the pointer.
According to RCU_INIT_POINTER()'s block comment:
"1.   This use of RCU_INIT_POINTER() is NULLing out the pointer"
it is better to use it instead of rcu_assign_pointer() because it has a
smaller overhead.

The following Coccinelle semantic patch was used:
@@
@@

- rcu_assign_pointer
+ RCU_INIT_POINTER
  (..., NULL)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/inode.c