Skip to content

Commit c9c6cac

Browse files
author
Al Viro
committed
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>
1 parent 15a9155 commit c9c6cac

6 files changed

Lines changed: 8 additions & 9 deletions

File tree

‎arch/powerpc/platforms/cell/spufs/syscalls.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static long do_spu_create(const char __user *pathname, unsigned int flags,
7070
if (!IS_ERR(tmp)) {
7171
struct nameidata nd;
7272

73-
ret = path_lookup(tmp, LOOKUP_PARENT, &nd);
73+
ret = kern_path_parent(tmp, &nd);
7474
if (!ret) {
7575
nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE;
7676
ret = spufs_create(&nd, flags, mode, neighbor);

‎fs/namei.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,10 +1747,9 @@ static int do_path_lookup(int dfd, const char *name,
17471747
return retval;
17481748
}
17491749

1750-
int path_lookup(const char *name, unsigned int flags,
1751-
struct nameidata *nd)
1750+
int kern_path_parent(const char *name, struct nameidata *nd)
17521751
{
1753-
return do_path_lookup(AT_FDCWD, name, flags, nd);
1752+
return do_path_lookup(AT_FDCWD, name, LOOKUP_PARENT, nd);
17541753
}
17551754

17561755
int kern_path(const char *name, unsigned int flags, struct path *path)
@@ -3586,7 +3585,7 @@ EXPORT_SYMBOL(page_readlink);
35863585
EXPORT_SYMBOL(__page_symlink);
35873586
EXPORT_SYMBOL(page_symlink);
35883587
EXPORT_SYMBOL(page_symlink_inode_operations);
3589-
EXPORT_SYMBOL(path_lookup);
3588+
EXPORT_SYMBOL(kern_path_parent);
35903589
EXPORT_SYMBOL(kern_path);
35913590
EXPORT_SYMBOL(vfs_path_lookup);
35923591
EXPORT_SYMBOL(inode_permission);

‎fs/ocfs2/refcounttree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4379,7 +4379,7 @@ static int ocfs2_user_path_parent(const char __user *path,
43794379
if (IS_ERR(s))
43804380
return PTR_ERR(s);
43814381

4382-
error = path_lookup(s, LOOKUP_PARENT, nd);
4382+
error = kern_path_parent(s, nd);
43834383
if (error)
43844384
putname(s);
43854385
else

‎include/linux/namei.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *);
7272

7373
extern int kern_path(const char *, unsigned, struct path *);
7474

75-
extern int path_lookup(const char *, unsigned, struct nameidata *);
75+
extern int kern_path_parent(const char *, struct nameidata *);
7676
extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
7777
const char *, unsigned int, struct nameidata *);
7878

‎kernel/audit_watch.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ static int audit_get_nd(struct audit_watch *watch, struct path *parent)
359359
struct dentry *d;
360360
int err;
361361

362-
err = path_lookup(watch->path, LOOKUP_PARENT, &nd);
362+
err = kern_path_parent(watch->path, &nd);
363363
if (err)
364364
return err;
365365

‎net/unix/af_unix.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
850850
* Get the parent directory, calculate the hash for last
851851
* component.
852852
*/
853-
err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd);
853+
err = kern_path_parent(sunaddr->sun_path, &nd);
854854
if (err)
855855
goto out_mknod_parent;
856856

0 commit comments

Comments
 (0)