diff options
author | Christoph Hellwig <hch@lst.de> | 2008-11-05 09:07:21 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-31 18:07:41 -0500 |
commit | b4091d5f6fde28ab762e1094a1a26d81f3badfa5 (patch) | |
tree | 776e0dfeefb7966f4151fe22cb2b9b7482566714 /fs/namei.c | |
parent | 66f221875dc10813aa2f06c83ad60d0eb1356406 (diff) |
kill walk_init_root
walk_init_root is a tiny helper that is marked __always_inline, has just
one caller and an unused argument. Just merge it into the caller.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/namei.c b/fs/namei.c index 631cfdd45c68..d4d0b59ed2cc 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -526,18 +526,6 @@ out_unlock: | |||
526 | return result; | 526 | return result; |
527 | } | 527 | } |
528 | 528 | ||
529 | /* SMP-safe */ | ||
530 | static __always_inline void | ||
531 | walk_init_root(const char *name, struct nameidata *nd) | ||
532 | { | ||
533 | struct fs_struct *fs = current->fs; | ||
534 | |||
535 | read_lock(&fs->lock); | ||
536 | nd->path = fs->root; | ||
537 | path_get(&fs->root); | ||
538 | read_unlock(&fs->lock); | ||
539 | } | ||
540 | |||
541 | /* | 529 | /* |
542 | * Wrapper to retry pathname resolution whenever the underlying | 530 | * Wrapper to retry pathname resolution whenever the underlying |
543 | * file system returns an ESTALE. | 531 | * file system returns an ESTALE. |
@@ -575,9 +563,16 @@ static __always_inline int __vfs_follow_link(struct nameidata *nd, const char *l | |||
575 | goto fail; | 563 | goto fail; |
576 | 564 | ||
577 | if (*link == '/') { | 565 | if (*link == '/') { |
566 | struct fs_struct *fs = current->fs; | ||
567 | |||
578 | path_put(&nd->path); | 568 | path_put(&nd->path); |
579 | walk_init_root(link, nd); | 569 | |
570 | read_lock(&fs->lock); | ||
571 | nd->path = fs->root; | ||
572 | path_get(&fs->root); | ||
573 | read_unlock(&fs->lock); | ||
580 | } | 574 | } |
575 | |||
581 | res = link_path_walk(link, nd); | 576 | res = link_path_walk(link, nd); |
582 | if (nd->depth || res || nd->last_type!=LAST_NORM) | 577 | if (nd->depth || res || nd->last_type!=LAST_NORM) |
583 | return res; | 578 | return res; |