We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f55532a commit 7500c38Copy full SHA for 7500c38
fs/namei.c
@@ -1740,15 +1740,17 @@ static int walk_component(struct nameidata *nd, int flags)
1740
nd->flags);
1741
if (IS_ERR(path.dentry))
1742
return PTR_ERR(path.dentry);
1743
- if (unlikely(d_is_negative(path.dentry))) {
1744
- dput(path.dentry);
1745
- return -ENOENT;
1746
- }
+
1747
path.mnt = nd->path.mnt;
1748
err = follow_managed(&path, nd);
1749
if (unlikely(err < 0))
1750
return err;
1751
+ if (unlikely(d_is_negative(path.dentry))) {
+ path_to_nameidata(&path, nd);
+ return -ENOENT;
1752
+ }
1753
1754
seq = 0; /* we are already out of RCU mode */
1755
inode = d_backing_inode(path.dentry);
1756
}
0 commit comments