Commit c9c6cac0 authored by Al Viro's avatar Al Viro

kill path_lookup()

all remaining callers pass LOOKUP_PARENT to it, so
flags argument can die; renamed to kern_path_parent()
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 15a9155f
...@@ -70,7 +70,7 @@ static long do_spu_create(const char __user *pathname, unsigned int flags, ...@@ -70,7 +70,7 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
if (!IS_ERR(tmp)) { if (!IS_ERR(tmp)) {
struct nameidata nd; struct nameidata nd;
ret = path_lookup(tmp, LOOKUP_PARENT, &nd); ret = kern_path_parent(tmp, &nd);
if (!ret) { if (!ret) {
nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE; nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE;
ret = spufs_create(&nd, flags, mode, neighbor); ret = spufs_create(&nd, flags, mode, neighbor);
......
...@@ -1747,10 +1747,9 @@ static int do_path_lookup(int dfd, const char *name, ...@@ -1747,10 +1747,9 @@ static int do_path_lookup(int dfd, const char *name,
return retval; return retval;
} }
int path_lookup(const char *name, unsigned int flags, int kern_path_parent(const char *name, struct nameidata *nd)
struct nameidata *nd)
{ {
return do_path_lookup(AT_FDCWD, name, flags, nd); return do_path_lookup(AT_FDCWD, name, LOOKUP_PARENT, nd);
} }
int kern_path(const char *name, unsigned int flags, struct path *path) int kern_path(const char *name, unsigned int flags, struct path *path)
...@@ -3586,7 +3585,7 @@ EXPORT_SYMBOL(page_readlink); ...@@ -3586,7 +3585,7 @@ EXPORT_SYMBOL(page_readlink);
EXPORT_SYMBOL(__page_symlink); EXPORT_SYMBOL(__page_symlink);
EXPORT_SYMBOL(page_symlink); EXPORT_SYMBOL(page_symlink);
EXPORT_SYMBOL(page_symlink_inode_operations); EXPORT_SYMBOL(page_symlink_inode_operations);
EXPORT_SYMBOL(path_lookup); EXPORT_SYMBOL(kern_path_parent);
EXPORT_SYMBOL(kern_path); EXPORT_SYMBOL(kern_path);
EXPORT_SYMBOL(vfs_path_lookup); EXPORT_SYMBOL(vfs_path_lookup);
EXPORT_SYMBOL(inode_permission); EXPORT_SYMBOL(inode_permission);
......
...@@ -4379,7 +4379,7 @@ static int ocfs2_user_path_parent(const char __user *path, ...@@ -4379,7 +4379,7 @@ static int ocfs2_user_path_parent(const char __user *path,
if (IS_ERR(s)) if (IS_ERR(s))
return PTR_ERR(s); return PTR_ERR(s);
error = path_lookup(s, LOOKUP_PARENT, nd); error = kern_path_parent(s, nd);
if (error) if (error)
putname(s); putname(s);
else else
......
...@@ -72,7 +72,7 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *); ...@@ -72,7 +72,7 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *);
extern int kern_path(const char *, unsigned, struct path *); extern int kern_path(const char *, unsigned, struct path *);
extern int path_lookup(const char *, unsigned, struct nameidata *); extern int kern_path_parent(const char *, struct nameidata *);
extern int vfs_path_lookup(struct dentry *, struct vfsmount *, extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
const char *, unsigned int, struct nameidata *); const char *, unsigned int, struct nameidata *);
......
...@@ -359,7 +359,7 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent) ...@@ -359,7 +359,7 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent)
struct dentry *d; struct dentry *d;
int err; int err;
err = path_lookup(watch->path, LOOKUP_PARENT, &nd); err = kern_path_parent(watch->path, &nd);
if (err) if (err)
return err; return err;
......
...@@ -850,7 +850,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) ...@@ -850,7 +850,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
* Get the parent directory, calculate the hash for last * Get the parent directory, calculate the hash for last
* component. * component.
*/ */
err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd); err = kern_path_parent(sunaddr->sun_path, &nd);
if (err) if (err)
goto out_mknod_parent; goto out_mknod_parent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment