summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-02-29 12:12:46 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-09 15:34:49 -0800
commit53729dbbd20a517c4ecb994cfe994bc832b30523 (patch)
tree32b5d1d452c0a1293e7dbf2adf2c8eaac3bf82a1 /include
parentc252409a688a831385fb71097db7a86ffe595b74 (diff)
use ->d_seq to get coherency between ->d_inode and ->d_flags
commit a528aca7f359f4b0b1d72ae406097e491a5ba9ea upstream. 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. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dcache.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index d67ae119cf4e..8a2e009c8a5a 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)