diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-27 17:00:37 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:44:14 -0400 |
commit | e0a0124936171af6156b80fe8ac8799f039e767f (patch) | |
tree | 5eed31f5b5dbf43f9a4d0e14fb4f9e1f9bcfd6d0 /fs/namei.c | |
parent | ed75e95de574c99575e5f3e1d9ca59ea8c12a9cb (diff) |
switch vfs_path_lookup() to struct path
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index b45a039216c7..7e6ba8c80e77 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1575,16 +1575,22 @@ int kern_path(const char *name, unsigned int flags, struct path *path) | |||
1575 | * @mnt: pointer to vfs mount of the base directory | 1575 | * @mnt: pointer to vfs mount of the base directory |
1576 | * @name: pointer to file name | 1576 | * @name: pointer to file name |
1577 | * @flags: lookup flags | 1577 | * @flags: lookup flags |
1578 | * @nd: pointer to nameidata | 1578 | * @path: pointer to struct path to fill |
1579 | */ | 1579 | */ |
1580 | int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt, | 1580 | int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt, |
1581 | const char *name, unsigned int flags, | 1581 | const char *name, unsigned int flags, |
1582 | struct nameidata *nd) | 1582 | struct path *path) |
1583 | { | 1583 | { |
1584 | nd->root.dentry = dentry; | 1584 | struct nameidata nd; |
1585 | nd->root.mnt = mnt; | 1585 | int err; |
1586 | nd.root.dentry = dentry; | ||
1587 | nd.root.mnt = mnt; | ||
1588 | BUG_ON(flags & LOOKUP_PARENT); | ||
1586 | /* the first argument of do_path_lookup() is ignored with LOOKUP_ROOT */ | 1589 | /* the first argument of do_path_lookup() is ignored with LOOKUP_ROOT */ |
1587 | return do_path_lookup(AT_FDCWD, name, flags | LOOKUP_ROOT, nd); | 1590 | err = do_path_lookup(AT_FDCWD, name, flags | LOOKUP_ROOT, &nd); |
1591 | if (!err) | ||
1592 | *path = nd.path; | ||
1593 | return err; | ||
1588 | } | 1594 | } |
1589 | 1595 | ||
1590 | static struct dentry *__lookup_hash(struct qstr *name, | 1596 | static struct dentry *__lookup_hash(struct qstr *name, |