Commit c9c6cac0c2bdbda42e7b804838648d0bc60ddb13

Authored by Al Viro
1 parent 15a9155fe3

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>

Showing 6 changed files with 8 additions and 9 deletions Side-by-side Diff

arch/powerpc/platforms/cell/spufs/syscalls.c
... ... @@ -70,7 +70,7 @@
70 70 if (!IS_ERR(tmp)) {
71 71 struct nameidata nd;
72 72  
73   - ret = path_lookup(tmp, LOOKUP_PARENT, &nd);
  73 + ret = kern_path_parent(tmp, &nd);
74 74 if (!ret) {
75 75 nd.flags |= LOOKUP_OPEN | LOOKUP_CREATE;
76 76 ret = spufs_create(&nd, flags, mode, neighbor);
... ... @@ -1747,10 +1747,9 @@
1747 1747 return retval;
1748 1748 }
1749 1749  
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)
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 1755 int kern_path(const char *name, unsigned int flags, struct path *path)
... ... @@ -3586,7 +3585,7 @@
3586 3585 EXPORT_SYMBOL(__page_symlink);
3587 3586 EXPORT_SYMBOL(page_symlink);
3588 3587 EXPORT_SYMBOL(page_symlink_inode_operations);
3589   -EXPORT_SYMBOL(path_lookup);
  3588 +EXPORT_SYMBOL(kern_path_parent);
3590 3589 EXPORT_SYMBOL(kern_path);
3591 3590 EXPORT_SYMBOL(vfs_path_lookup);
3592 3591 EXPORT_SYMBOL(inode_permission);
fs/ocfs2/refcounttree.c
... ... @@ -4379,7 +4379,7 @@
4379 4379 if (IS_ERR(s))
4380 4380 return PTR_ERR(s);
4381 4381  
4382   - error = path_lookup(s, LOOKUP_PARENT, nd);
  4382 + error = kern_path_parent(s, nd);
4383 4383 if (error)
4384 4384 putname(s);
4385 4385 else
include/linux/namei.h
... ... @@ -72,7 +72,7 @@
72 72  
73 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 76 extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
77 77 const char *, unsigned int, struct nameidata *);
78 78  
kernel/audit_watch.c
... ... @@ -359,7 +359,7 @@
359 359 struct dentry *d;
360 360 int err;
361 361  
362   - err = path_lookup(watch->path, LOOKUP_PARENT, &nd);
  362 + err = kern_path_parent(watch->path, &nd);
363 363 if (err)
364 364 return err;
365 365  
... ... @@ -850,7 +850,7 @@
850 850 * Get the parent directory, calculate the hash for last
851 851 * component.
852 852 */
853   - err = path_lookup(sunaddr->sun_path, LOOKUP_PARENT, &nd);
  853 + err = kern_path_parent(sunaddr->sun_path, &nd);
854 854 if (err)
855 855 goto out_mknod_parent;
856 856