mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user