aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 0f02359ce685..14c73edca9ce 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -479,6 +479,14 @@ static int nameidata_dentry_drop_rcu(struct nameidata *nd, struct dentry *dentry
479 struct fs_struct *fs = current->fs; 479 struct fs_struct *fs = current->fs;
480 struct dentry *parent = nd->path.dentry; 480 struct dentry *parent = nd->path.dentry;
481 481
482 /*
483 * It can be possible to revalidate the dentry that we started
484 * the path walk with. force_reval_path may also revalidate the
485 * dentry already committed to the nameidata.
486 */
487 if (unlikely(parent == dentry))
488 return nameidata_drop_rcu(nd);
489
482 BUG_ON(!(nd->flags & LOOKUP_RCU)); 490 BUG_ON(!(nd->flags & LOOKUP_RCU));
483 if (nd->root.mnt) { 491 if (nd->root.mnt) {
484 spin_lock(&fs->lock); 492 spin_lock(&fs->lock);