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

Commit 01183609 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull VFS fix from Al Viro:
 "Spurious ENOTDIR fix"

This should fix the problems reported by Dominique Martinet and Hugh
Dickins.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  link_path_walk(): be careful when failing with ENOTDIR
parents 3f6d9e08 97242f99
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1954,10 +1954,15 @@ static int link_path_walk(const char *name, struct nameidata *nd)
				continue;
			}
		}
		if (unlikely(!d_can_lookup(nd->path.dentry)))
		if (unlikely(!d_can_lookup(nd->path.dentry))) {
			if (nd->flags & LOOKUP_RCU) {
				if (unlazy_walk(nd, NULL, 0))
					return -ECHILD;
			}
			return -ENOTDIR;
		}
	}
}

static const char *path_init(struct nameidata *nd, unsigned flags)
{