summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-06-27 17:00:37 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 01:44:14 -0400
commite0a0124936171af6156b80fe8ac8799f039e767f (patch)
tree5eed31f5b5dbf43f9a4d0e14fb4f9e1f9bcfd6d0 /fs/namei.c
parented75e95de574c99575e5f3e1d9ca59ea8c12a9cb (diff)
downloadop-kernel-dev-e0a0124936171af6156b80fe8ac8799f039e767f.zip
op-kernel-dev-e0a0124936171af6156b80fe8ac8799f039e767f.tar.gz
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.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index b45a039..7e6ba8c 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)
* @mnt: pointer to vfs mount of the base directory
* @name: pointer to file name
* @flags: lookup flags
- * @nd: pointer to nameidata
+ * @path: pointer to struct path to fill
*/
int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
const char *name, unsigned int flags,
- struct nameidata *nd)
+ struct path *path)
{
- nd->root.dentry = dentry;
- nd->root.mnt = mnt;
+ struct nameidata nd;
+ int err;
+ nd.root.dentry = dentry;
+ nd.root.mnt = mnt;
+ BUG_ON(flags & LOOKUP_PARENT);
/* the first argument of do_path_lookup() is ignored with LOOKUP_ROOT */
- return do_path_lookup(AT_FDCWD, name, flags | LOOKUP_ROOT, nd);
+ err = do_path_lookup(AT_FDCWD, name, flags | LOOKUP_ROOT, &nd);
+ if (!err)
+ *path = nd.path;
+ return err;
}
static struct dentry *__lookup_hash(struct qstr *name,
OpenPOWER on IntegriCloud