mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04: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:
parent
5129fa482b
commit
a528aca7f3
2 changed files with 6 additions and 18 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue