diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 1b5f38f48dab..36d921f0c602 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1102,7 +1102,7 @@ static int nfs_lookup_revalidate(struct dentry *dentry, unsigned int flags) int error; if (flags & LOOKUP_RCU) { - parent = rcu_dereference(dentry->d_parent); + parent = ACCESS_ONCE(dentry->d_parent); dir = ACCESS_ONCE(parent->d_inode); if (!dir) return -ECHILD; @@ -1184,7 +1184,7 @@ out_set_verifier: nfs_advise_use_readdirplus(dir); out_valid_noent: if (flags & LOOKUP_RCU) { - if (parent != rcu_dereference(dentry->d_parent)) + if (parent != ACCESS_ONCE(dentry->d_parent)) return -ECHILD; } else dput(parent); @@ -1585,7 +1585,7 @@ static int nfs4_lookup_revalidate(struct dentry *dentry, unsigned int flags) struct inode *dir; if (flags & LOOKUP_RCU) { - parent = rcu_dereference(dentry); + parent = ACCESS_ONCE(dentry->d_parent); dir = ACCESS_ONCE(parent->d_inode); if (!dir) return -ECHILD; @@ -1599,7 +1599,7 @@ static int nfs4_lookup_revalidate(struct dentry *dentry, unsigned int flags) ret = -ECHILD; if (!(flags & LOOKUP_RCU)) dput(parent); - else if (parent != rcu_dereference(dentry)) + else if (parent != ACCESS_ONCE(dentry->d_parent)) return -ECHILD; goto out; } |