Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[platform/kernel/linux-rpi.git] / fs / ext4 / dir.c
index efe77cf..5b81f3b 100644 (file)
@@ -674,7 +674,7 @@ static int ext4_d_compare(const struct dentry *dentry, unsigned int len,
 {
        struct qstr qstr = {.name = str, .len = len };
        const struct dentry *parent = READ_ONCE(dentry->d_parent);
-       const struct inode *inode = READ_ONCE(parent->d_inode);
+       const struct inode *inode = d_inode_rcu(parent);
        char strbuf[DNAME_INLINE_LEN];
 
        if (!inode || !IS_CASEFOLDED(inode) ||
@@ -706,7 +706,7 @@ static int ext4_d_hash(const struct dentry *dentry, struct qstr *str)
 {
        const struct ext4_sb_info *sbi = EXT4_SB(dentry->d_sb);
        const struct unicode_map *um = sbi->s_encoding;
-       const struct inode *inode = READ_ONCE(dentry->d_inode);
+       const struct inode *inode = d_inode_rcu(dentry);
        unsigned char *norm;
        int len, ret = 0;