summaryrefslogtreecommitdiff
path: root/lib/percpu-refcount.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-10-09 10:04:27 -0700
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-12-04 10:52:52 -0800
commit7088efa9137a15d7d21e3abce73e40c9c8a18d68 (patch)
treea410e9354ca53593b66a1ca8e34041b7d480aaaa /lib/percpu-refcount.c
parentcb7e125e03274cffa97d74433c876765efffaf6a (diff)
fs/dcache: Use release-acquire for name/length update
The code in __d_alloc() carefully orders filling in the NUL character of the name (and the length, hash, and the name itself) with assigning of the name itself. However, prepend_name() does not order the accesses to the ->name and ->len fields, other than on TSO systems. This commit therefore replaces prepend_name()'s READ_ONCE() of ->name with an smp_load_acquire(), which orders against the subsequent READ_ONCE() of ->len. Because READ_ONCE() now incorporates smp_read_barrier_depends(), prepend_name()'s smp_read_barrier_depends() is removed. Finally, to save a line, the smp_wmb()/store pair in __d_alloc() is replaced by smp_store_release(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: <linux-fsdevel@vger.kernel.org>
Diffstat (limited to 'lib/percpu-refcount.c')
0 files changed, 0 insertions, 0 deletions