Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9dcfaff authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs fix from Al Viro.

Automount handling was broken by commit e3c13928 ("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()"
parents ca457204 7500c38a
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -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);
	}