diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-31 07:19:39 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-31 07:19:39 -0500 |
commit | e9dcfaff0105045d6bbacb7620ee13f1976ecf07 (patch) | |
tree | 226df86064dc8dd5b51ca03ce1ade33cfec682ea /fs | |
parent | ca4572042e41a1aed2139ef66b0427c1f8d10179 (diff) | |
parent | 7500c38ac3258815f86f41744a538850c3221b23 (diff) | |
download | linux-e9dcfaff0105045d6bbacb7620ee13f1976ecf07.tar.bz2 |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fix from Al Viro.
Automount handling was broken by commit e3c13928086f ("namei: massage
lookup_slow() to be usable by lookup_one_len_unlocked()") moving the
test for negative dentry too early.
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix the braino in "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()"
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c index 794f81dce766..1d9ca2d5dff6 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1740,15 +1740,17 @@ static int walk_component(struct nameidata *nd, int flags) nd->flags); if (IS_ERR(path.dentry)) return PTR_ERR(path.dentry); - if (unlikely(d_is_negative(path.dentry))) { - dput(path.dentry); - return -ENOENT; - } + path.mnt = nd->path.mnt; err = follow_managed(&path, nd); if (unlikely(err < 0)) return err; + if (unlikely(d_is_negative(path.dentry))) { + path_to_nameidata(&path, nd); + return -ENOENT; + } + seq = 0; /* we are already out of RCU mode */ inode = d_backing_inode(path.dentry); } |