OSDN Git Service

ceph: fix improper use of smp_mb__before_atomic()
authorAndrea Parri <andrea.parri@amarulasolutions.com>
Mon, 20 May 2019 17:23:58 +0000 (19:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Aug 2019 16:29:35 +0000 (18:29 +0200)
commit4e064062d391df79d62eb8a0309c94636e303ccd
treecf02d578053d12285796b48ad40d9ddc6927541a
parent44f7521a23f58e5d970112c3040fffc4a4dd964f
ceph: fix improper use of smp_mb__before_atomic()

[ Upstream commit 749607731e26dfb2558118038c40e9c0c80d23b5 ]

This barrier only applies to the read-modify-write operations; in
particular, it does not apply to the atomic64_set() primitive.

Replace the barrier with an smp_mb().

Fixes: fdd4e15838e59 ("ceph: rework dcache readdir")
Reported-by: "Paul E. McKenney" <paulmck@linux.ibm.com>
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/ceph/super.h