kill path_lookup()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 16 Feb 2011 20:15:47 +0000 (15:15 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 14 Mar 2011 13:15:23 +0000 (09:15 -0400)
all remaining callers pass LOOKUP_PARENT to it, so
flags argument can die; renamed to kern_path_parent()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/powerpc/platforms/cell/spufs/syscalls.c
fs/namei.c
fs/ocfs2/refcounttree.c
include/linux/namei.h
kernel/audit_watch.c
net/unix/af_unix.c

index 187a7d32f86a25ea2ff19e1fab99f7c551d0d59e..a3d2ce54ea2eb0f1f22ba3cb7d9973eecaf06453 100644 (file)
@@ -70,7 +70,7 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
        if (!IS_ERR(tmp)) {
                struct nameidata nd;
 
-               ret = path_lookup(tmp, LOOKUP_PARENT, &nd);
+               ret = kern_path_parent(tmp, &nd);
                if (!ret) {
                        nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE;
                        ret = spufs_create(&nd, flags, mode, neighbor);
index a4689eb2df285eb513d049fa0c5122f1edd4b198..1d6bc8151553729cffa645ef79e06e17b9e5691e 100644 (file)
@@ -1747,10 +1747,9 @@ static int do_path_lookup(int dfd, const char *name,
        return retval;
 }
 
-int path_lookup(const char *name, unsigned int flags,
-                       struct nameidata *nd)
+int kern_path_parent(const char *name, 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)
@@ -3586,7 +3585,7 @@ EXPORT_SYMBOL(page_readlink);
 EXPORT_SYMBOL(__page_symlink);
 EXPORT_SYMBOL(page_symlink);
 EXPORT_SYMBOL(page_symlink_inode_operations);
-EXPORT_SYMBOL(path_lookup);
+EXPORT_SYMBOL(kern_path_parent);
 EXPORT_SYMBOL(kern_path);
 EXPORT_SYMBOL(vfs_path_lookup);
 EXPORT_SYMBOL(inode_permission);
index 19ebc5aad391f73d58b22b0583114bf7d0517eb8..29623da133ccbf5c524c336b247b7e8af66913b8 100644 (file)
@@ -4379,7 +4379,7 @@ static int ocfs2_user_path_parent(const char __user *path,
        if (IS_ERR(s))
                return PTR_ERR(s);
 
-       error = path_lookup(s, LOOKUP_PARENT, nd);
+       error = kern_path_parent(s, nd);
        if (error)
                putname(s);
        else
index f276d4fa01fc886fe7a3dbff57733501d00eaece..58ce3433d4ec81fe3d0ed76d5fb24659d2c9ed0f 100644 (file)
@@ -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 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 *,
                           const char *, unsigned int, struct nameidata *);
 
index 20b9fe6907d02c66f0f84b28548682f5ddc8c6e7..e683869365d9bdaf60abcb44e37da05506ab5672 100644 (file)
@@ -359,7 +359,7 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent)
        struct dentry *d;
        int err;
 
-       err = path_lookup(watch->path, LOOKUP_PARENT, &nd);
+       err = kern_path_parent(watch->path, &nd);
        if (err)
                return err;
 
index dd419d2862043c95001df58853d2799cc135d5dc..d8c04a602cf1d923f5745f03c66e1ede97a0c5e7 100644 (file)
@@ -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
                 * component.
                 */
-               err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd);
+               err = kern_path_parent(sunaddr->sun_path, &nd);
                if (err)
                        goto out_mknod_parent;