diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-24 18:10:25 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:34 -0500 |
commit | 21b9b073924aceb6b8d19c49f61daa86c0340e1a (patch) | |
tree | 8541c341b6742450dfe1958d3d234f11ca3ec580 /fs/namei.c | |
parent | 5f4a6a695075b79261793c25b1128e3b30007646 (diff) |
get rid of name and type arguments of walk_component()
... always can be found in nameidata now.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/namei.c b/fs/namei.c index 14eab848f7d..5f6da6cca39 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1519,7 +1519,7 @@ static inline int should_follow_link(struct inode *inode, int follow) } static inline int walk_component(struct nameidata *nd, struct path *path, - struct qstr *name, int type, int follow) + int follow) { struct inode *inode; int err; @@ -1528,14 +1528,14 @@ static inline int walk_component(struct nameidata *nd, struct path *path, * to be able to know about the current root directory and * parent relationships. */ - if (unlikely(type != LAST_NORM)) - return handle_dots(nd, type); - err = lookup_fast(nd, name, path, &inode); + if (unlikely(nd->last_type != LAST_NORM)) + return handle_dots(nd, nd->last_type); + err = lookup_fast(nd, &nd->last, path, &inode); if (unlikely(err)) { if (err < 0) goto out_err; - err = lookup_slow(nd, name, path); + err = lookup_slow(nd, &nd->last, path); if (err < 0) goto out_err; @@ -1594,8 +1594,7 @@ static inline int nested_symlink(struct path *path, struct nameidata *nd) res = follow_link(&link, nd, &cookie); if (res) break; - res = walk_component(nd, path, &nd->last, - nd->last_type, LOOKUP_FOLLOW); + res = walk_component(nd, path, LOOKUP_FOLLOW); put_link(nd, &link, cookie); } while (res > 0); @@ -1819,7 +1818,7 @@ static int link_path_walk(const char *name, struct nameidata *nd) name += len; - err = walk_component(nd, &next, &this, type, LOOKUP_FOLLOW); + err = walk_component(nd, &next, LOOKUP_FOLLOW); if (err < 0) return err; @@ -1930,8 +1929,7 @@ static inline int lookup_last(struct nameidata *nd, struct path *path) nd->flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY; nd->flags &= ~LOOKUP_PARENT; - return walk_component(nd, path, &nd->last, nd->last_type, - nd->flags & LOOKUP_FOLLOW); + return walk_component(nd, path, nd->flags & LOOKUP_FOLLOW); } /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */ |