diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-22 19:40:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-24 17:19:15 -0400 |
commit | 5eb6b495c60ef865324a81898eeb18062fd81662 (patch) | |
tree | e47d698fec97ae278211d5d0c0246f10bfb5af26 | |
parent | 94b5d2621aef59271c53cd13ecf9249e24b3d4df (diff) |
switch path_lookupat() to struct filename
all callers were passing it ->name of some struct filename
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/namei.c b/fs/namei.c index a5421a12bb92..92b1f00cc05a 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -1969,7 +1969,7 @@ static inline int lookup_last(struct nameidata *nd, struct path *path) | |||
1969 | } | 1969 | } |
1970 | 1970 | ||
1971 | /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ | 1971 | /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ |
1972 | static int path_lookupat(int dfd, const char *name, | 1972 | static int path_lookupat(int dfd, const struct filename *name, |
1973 | unsigned int flags, struct nameidata *nd) | 1973 | unsigned int flags, struct nameidata *nd) |
1974 | { | 1974 | { |
1975 | struct path path; | 1975 | struct path path; |
@@ -1989,7 +1989,7 @@ static int path_lookupat(int dfd, const char *name, | |||
1989 | * be handled by restarting a traditional ref-walk (which will always | 1989 | * be handled by restarting a traditional ref-walk (which will always |
1990 | * be able to complete). | 1990 | * be able to complete). |
1991 | */ | 1991 | */ |
1992 | err = path_init(dfd, name, flags, nd); | 1992 | err = path_init(dfd, name->name, flags, nd); |
1993 | if (!err && !(flags & LOOKUP_PARENT)) { | 1993 | if (!err && !(flags & LOOKUP_PARENT)) { |
1994 | err = lookup_last(nd, &path); | 1994 | err = lookup_last(nd, &path); |
1995 | while (err > 0) { | 1995 | while (err > 0) { |
@@ -2024,12 +2024,11 @@ static int path_lookupat(int dfd, const char *name, | |||
2024 | static int filename_lookup(int dfd, struct filename *name, | 2024 | static int filename_lookup(int dfd, struct filename *name, |
2025 | unsigned int flags, struct nameidata *nd) | 2025 | unsigned int flags, struct nameidata *nd) |
2026 | { | 2026 | { |
2027 | int retval = path_lookupat(dfd, name->name, flags | LOOKUP_RCU, nd); | 2027 | int retval = path_lookupat(dfd, name, flags | LOOKUP_RCU, nd); |
2028 | if (unlikely(retval == -ECHILD)) | 2028 | if (unlikely(retval == -ECHILD)) |
2029 | retval = path_lookupat(dfd, name->name, flags, nd); | 2029 | retval = path_lookupat(dfd, name, flags, nd); |
2030 | if (unlikely(retval == -ESTALE)) | 2030 | if (unlikely(retval == -ESTALE)) |
2031 | retval = path_lookupat(dfd, name->name, | 2031 | retval = path_lookupat(dfd, name, flags | LOOKUP_REVAL, nd); |
2032 | flags | LOOKUP_REVAL, nd); | ||
2033 | 2032 | ||
2034 | if (likely(!retval)) | 2033 | if (likely(!retval)) |
2035 | audit_inode(name, nd->path.dentry, flags & LOOKUP_PARENT); | 2034 | audit_inode(name, nd->path.dentry, flags & LOOKUP_PARENT); |
@@ -3153,7 +3152,7 @@ static int do_tmpfile(int dfd, struct filename *pathname, | |||
3153 | static const struct qstr name = QSTR_INIT("/", 1); | 3152 | static const struct qstr name = QSTR_INIT("/", 1); |
3154 | struct dentry *dentry, *child; | 3153 | struct dentry *dentry, *child; |
3155 | struct inode *dir; | 3154 | struct inode *dir; |
3156 | int error = path_lookupat(dfd, pathname->name, | 3155 | int error = path_lookupat(dfd, pathname, |
3157 | flags | LOOKUP_DIRECTORY, nd); | 3156 | flags | LOOKUP_DIRECTORY, nd); |
3158 | if (unlikely(error)) | 3157 | if (unlikely(error)) |
3159 | return error; | 3158 | return error; |