vfs: move get_fs_root_and_pwd() to single caller
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Sep 2013 17:12:47 +0000 (10:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Sep 2013 17:12:47 +0000 (10:12 -0700)
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>
fs/dcache.c
include/linux/fs_struct.h

index f3dcc6351a162317f1f51fcb17bd6bd0a8adf809..4df68e27cbc7dc4f1fed51928137d8f0beca6e90 100644 (file)
@@ -3015,6 +3015,17 @@ Elong:
        return ERR_PTR(-ENAMETOOLONG);
 }
 
+static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root,
+                                      struct path *pwd)
+{
+       spin_lock(&fs->lock);
+       *root = fs->root;
+       path_get(root);
+       *pwd = fs->pwd;
+       path_get(pwd);
+       spin_unlock(&fs->lock);
+}
+
 /*
  * NOTE! The user-level library version returns a
  * character pointer. The kernel system call just
index 2b93a9a5a1e6b8ef4a15a6aaf36ade3b48bd0d98..0efc3e62843ae74592128dc7e34bd11fbaca4a3c 100644 (file)
@@ -39,17 +39,6 @@ static inline void get_fs_pwd(struct fs_struct *fs, struct path *pwd)
        spin_unlock(&fs->lock);
 }
 
-static inline void get_fs_root_and_pwd(struct fs_struct *fs, struct path *root,
-                                      struct path *pwd)
-{
-       spin_lock(&fs->lock);
-       *root = fs->root;
-       path_get(root);
-       *pwd = fs->pwd;
-       path_get(pwd);
-       spin_unlock(&fs->lock);
-}
-
 extern bool current_chrooted(void);
 
 #endif /* _LINUX_FS_STRUCT_H */