fs: dcache: Use READ_ONCE when accessing i_dir_seq
authorWill Deacon <will.deacon@arm.com>
Mon, 19 Feb 2018 14:55:55 +0000 (14:55 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 25 Feb 2018 17:51:10 +0000 (12:51 -0500)
commit8cc07c808c9d595e81cbe5aad419b7769eb2e5c9
treeb67b43888c8f559aba6365fd2a9965584d626f41
parent015555fd4d2930bc0c86952c46ad88b3392f66e4
fs: dcache: Use READ_ONCE when accessing i_dir_seq

i_dir_seq is subject to concurrent modification by a cmpxchg or
store-release operation, so ensure that the relaxed access in
d_alloc_parallel uses READ_ONCE.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c