diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 13:12:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 13:12:47 -0400 |
commit | 5762482f5496cb1dd86acd2aace3ea25d1404e1f (patch) | |
tree | 6d74d7b501002f7516e2eb3068f5a942f63098ee /fs/dcache.c | |
parent | b7c09ad4014e3678e8cc01fdf663c9f43b272dc6 (diff) |
vfs: move get_fs_root_and_pwd() to single caller
Let's not pollute the include files with inline functions that are only
used in a single place. Especially not if we decide we might want to
change the semantics of said function to make it more efficient..
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r-- | fs/dcache.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index f3dcc6351a16..4df68e27cbc7 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -3015,6 +3015,17 @@ Elong: | |||
3015 | return ERR_PTR(-ENAMETOOLONG); | 3015 | return ERR_PTR(-ENAMETOOLONG); |
3016 | } | 3016 | } |
3017 | 3017 | ||
3018 | static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root, | ||
3019 | struct path *pwd) | ||
3020 | { | ||
3021 | spin_lock(&fs->lock); | ||
3022 | *root = fs->root; | ||
3023 | path_get(root); | ||
3024 | *pwd = fs->pwd; | ||
3025 | path_get(pwd); | ||
3026 | spin_unlock(&fs->lock); | ||
3027 | } | ||
3028 | |||
3018 | /* | 3029 | /* |
3019 | * NOTE! The user-level library version returns a | 3030 | * NOTE! The user-level library version returns a |
3020 | * character pointer. The kernel system call just | 3031 | * character pointer. The kernel system call just |