diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 19:46:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-24 17:19:16 -0400 |
commit | 6e8a1f8741d6f1179cb3b03991caeac9e4bfd9e2 (patch) | |
tree | e3d91c170805b63be28a2cef9692d10e3042be84 /fs/namei.c | |
parent | 668696dcbb1b184f8758ba9903c373c4960174a9 (diff) | |
download | linux-stable-6e8a1f8741d6f1179cb3b03991caeac9e4bfd9e2.tar.gz linux-stable-6e8a1f8741d6f1179cb3b03991caeac9e4bfd9e2.tar.bz2 linux-stable-6e8a1f8741d6f1179cb3b03991caeac9e4bfd9e2.zip |
switch path_init() to struct filename
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, 8 insertions, 8 deletions
diff --git a/fs/namei.c b/fs/namei.c index e1d18522db31..2c4b68c12550 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1848,7 +1848,7 @@ static int link_path_walk(const char *name, struct nameidata *nd) return err; } -static int path_init(int dfd, const char *name, unsigned int flags, +static int path_init(int dfd, const struct filename *name, unsigned int flags, struct nameidata *nd) { int retval = 0; @@ -1860,7 +1860,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, if (flags & LOOKUP_ROOT) { struct dentry *root = nd->root.dentry; struct inode *inode = root->d_inode; - if (*name) { + if (name->name[0]) { if (!d_can_lookup(root)) return -ENOTDIR; retval = inode_permission(inode, MAY_EXEC); @@ -1882,7 +1882,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, nd->root.mnt = NULL; nd->m_seq = read_seqbegin(&mount_lock); - if (*name=='/') { + if (name->name[0] == '/') { if (flags & LOOKUP_RCU) { rcu_read_lock(); nd->seq = set_root_rcu(nd); @@ -1916,7 +1916,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, dentry = f.file->f_path.dentry; - if (*name) { + if (name->name[0]) { if (!d_can_lookup(dentry)) { fdput(f); return -ENOTDIR; @@ -1946,7 +1946,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, return -ECHILD; done: current->total_link_count = 0; - return link_path_walk(name, nd); + return link_path_walk(name->name, nd); } static void path_cleanup(struct nameidata *nd) @@ -1989,7 +1989,7 @@ static int path_lookupat(int dfd, const struct filename *name, * be handled by restarting a traditional ref-walk (which will always * be able to complete). */ - err = path_init(dfd, name->name, flags, nd); + err = path_init(dfd, name, flags, nd); if (!err && !(flags & LOOKUP_PARENT)) { err = lookup_last(nd, &path); while (err > 0) { @@ -2343,7 +2343,7 @@ path_mountpoint(int dfd, const struct filename *name, struct path *path, struct nameidata nd; int err; - err = path_init(dfd, name->name, flags, &nd); + err = path_init(dfd, name, flags, &nd); if (unlikely(err)) goto out; @@ -3226,7 +3226,7 @@ static struct file *path_openat(int dfd, struct filename *pathname, goto out; } - error = path_init(dfd, pathname->name, flags, nd); + error = path_init(dfd, pathname, flags, nd); if (unlikely(error)) goto out; |