diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-02-29 12:12:46 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-02-29 12:16:43 -0500 |
commit | a528aca7f359f4b0b1d72ae406097e491a5ba9ea (patch) | |
tree | 26b95bc4e207d3bd6afc11affbfa0fe85ac53b6a /include/linux/dcache.h | |
parent | 5129fa482b16615fd4464d2f5d23acb1b7056c66 (diff) |
use ->d_seq to get coherency between ->d_inode and ->d_flags
Games with ordering and barriers are way too brittle. Just
bump ->d_seq before and after updating ->d_inode and ->d_flags
type bits, so that verifying ->d_seq would guarantee they are
coherent.
Cc: stable@vger.kernel.org # v3.13+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r-- | include/linux/dcache.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 7781ce110503..c4b5f4b3f8f8 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -409,9 +409,7 @@ static inline bool d_mountpoint(const struct dentry *dentry) */ static inline unsigned __d_entry_type(const struct dentry *dentry) { - unsigned type = READ_ONCE(dentry->d_flags); - smp_rmb(); - return type & DCACHE_ENTRY_TYPE; + return dentry->d_flags & DCACHE_ENTRY_TYPE; } static inline bool d_is_miss(const struct dentry *dentry) |