diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-02-16 15:15:47 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-14 09:15:23 -0400 |
commit | c9c6cac0c2bdbda42e7b804838648d0bc60ddb13 (patch) | |
tree | c2d9b41eb24026d6769175e9ba3c17c8093b6aad | |
parent | 15a9155fe3e8215c02b80df51ec2cac7c0d726ad (diff) |
kill path_lookup()
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>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/syscalls.c | 2 | ||||
-rw-r--r-- | fs/namei.c | 7 | ||||
-rw-r--r-- | fs/ocfs2/refcounttree.c | 2 | ||||
-rw-r--r-- | include/linux/namei.h | 2 | ||||
-rw-r--r-- | kernel/audit_watch.c | 2 | ||||
-rw-r--r-- | net/unix/af_unix.c | 2 |
6 files changed, 8 insertions, 9 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/syscalls.c b/arch/powerpc/platforms/cell/spufs/syscalls.c index 187a7d32f86a..a3d2ce54ea2e 100644 --- a/arch/powerpc/platforms/cell/spufs/syscalls.c +++ b/arch/powerpc/platforms/cell/spufs/syscalls.c | |||
@@ -70,7 +70,7 @@ static long do_spu_create(const char __user *pathname, unsigned int flags, | |||
70 | if (!IS_ERR(tmp)) { | 70 | if (!IS_ERR(tmp)) { |
71 | struct nameidata nd; | 71 | struct nameidata nd; |
72 | 72 | ||
73 | ret = path_lookup(tmp, LOOKUP_PARENT, &nd); | 73 | ret = kern_path_parent(tmp, &nd); |
74 | if (!ret) { | 74 | if (!ret) { |
75 | nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE; | 75 | nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE; |
76 | ret = spufs_create(&nd, flags, mode, neighbor); | 76 | ret = spufs_create(&nd, flags, mode, neighbor); |
diff --git a/fs/namei.c b/fs/namei.c index a4689eb2df28..1d6bc8151553 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1747,10 +1747,9 @@ static int do_path_lookup(int dfd, const char *name, | |||
1747 | return retval; | 1747 | return retval; |
1748 | } | 1748 | } |
1749 | 1749 | ||
1750 | int path_lookup(const char *name, unsigned int flags, | 1750 | int kern_path_parent(const char *name, struct nameidata *nd) |
1751 | struct nameidata *nd) | ||
1752 | { | 1751 | { |
1753 | return do_path_lookup(AT_FDCWD, name, flags, nd); | 1752 | return do_path_lookup(AT_FDCWD, name, LOOKUP_PARENT, nd); |
1754 | } | 1753 | } |
1755 | 1754 | ||
1756 | int kern_path(const char *name, unsigned int flags, struct path *path) | 1755 | int kern_path(const char *name, unsigned int flags, struct path *path) |
@@ -3586,7 +3585,7 @@ EXPORT_SYMBOL(page_readlink); | |||
3586 | EXPORT_SYMBOL(__page_symlink); | 3585 | EXPORT_SYMBOL(__page_symlink); |
3587 | EXPORT_SYMBOL(page_symlink); | 3586 | EXPORT_SYMBOL(page_symlink); |
3588 | EXPORT_SYMBOL(page_symlink_inode_operations); | 3587 | EXPORT_SYMBOL(page_symlink_inode_operations); |
3589 | EXPORT_SYMBOL(path_lookup); | 3588 | EXPORT_SYMBOL(kern_path_parent); |
3590 | EXPORT_SYMBOL(kern_path); | 3589 | EXPORT_SYMBOL(kern_path); |
3591 | EXPORT_SYMBOL(vfs_path_lookup); | 3590 | EXPORT_SYMBOL(vfs_path_lookup); |
3592 | EXPORT_SYMBOL(inode_permission); | 3591 | EXPORT_SYMBOL(inode_permission); |
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 19ebc5aad391..29623da133cc 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c | |||
@@ -4379,7 +4379,7 @@ static int ocfs2_user_path_parent(const char __user *path, | |||
4379 | if (IS_ERR(s)) | 4379 | if (IS_ERR(s)) |
4380 | return PTR_ERR(s); | 4380 | return PTR_ERR(s); |
4381 | 4381 | ||
4382 | error = path_lookup(s, LOOKUP_PARENT, nd); | 4382 | error = kern_path_parent(s, nd); |
4383 | if (error) | 4383 | if (error) |
4384 | putname(s); | 4384 | putname(s); |
4385 | else | 4385 | else |
diff --git a/include/linux/namei.h b/include/linux/namei.h index f276d4fa01fc..58ce3433d4ec 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -72,7 +72,7 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *); | |||
72 | 72 | ||
73 | extern int kern_path(const char *, unsigned, struct path *); | 73 | extern int kern_path(const char *, unsigned, struct path *); |
74 | 74 | ||
75 | extern int path_lookup(const char *, unsigned, struct nameidata *); | 75 | extern int kern_path_parent(const char *, struct nameidata *); |
76 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 76 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
77 | const char *, unsigned int, struct nameidata *); | 77 | const char *, unsigned int, struct nameidata *); |
78 | 78 | ||
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 20b9fe6907d0..e683869365d9 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -359,7 +359,7 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent) | |||
359 | struct dentry *d; | 359 | struct dentry *d; |
360 | int err; | 360 | int err; |
361 | 361 | ||
362 | err = path_lookup(watch->path, LOOKUP_PARENT, &nd); | 362 | err = kern_path_parent(watch->path, &nd); |
363 | if (err) | 363 | if (err) |
364 | return err; | 364 | return err; |
365 | 365 | ||
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index dd419d286204..d8c04a602cf1 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -850,7 +850,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
850 | * Get the parent directory, calculate the hash for last | 850 | * Get the parent directory, calculate the hash for last |
851 | * component. | 851 | * component. |
852 | */ | 852 | */ |
853 | err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd); | 853 | err = kern_path_parent(sunaddr->sun_path, &nd); |
854 | if (err) | 854 | if (err) |
855 | goto out_mknod_parent; | 855 | goto out_mknod_parent; |
856 | 856 | ||