]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
trim fs/internal.h
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 22 Nov 2011 02:15:42 +0000 (21:15 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Jan 2012 03:52:35 +0000 (22:52 -0500)
some stuff in there can actually become static; some belongs to pnode.h
as it's a private interface between namespace.c and pnode.c...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/block_dev.c
fs/exec.c
fs/internal.h
fs/pnode.h
fs/super.c

index b07f1da1de4e34470fd64af913c9366e0d6c8513..4b322a58a5134cd546aa0335c2a0437dc89459c0 100644 (file)
@@ -493,7 +493,7 @@ static struct file_system_type bd_type = {
        .kill_sb        = kill_anon_super,
 };
 
-struct super_block *blockdev_superblock __read_mostly;
+static struct super_block *blockdev_superblock __read_mostly;
 
 void __init bdev_cache_init(void)
 {
@@ -639,6 +639,11 @@ static struct block_device *bd_acquire(struct inode *inode)
        return bdev;
 }
 
+static inline int sb_is_blkdev_sb(struct super_block *sb)
+{
+       return sb == blockdev_superblock;
+}
+
 /* Call when you free inode */
 
 void bd_forget(struct inode *inode)
index 36254645b7cc4d81f7c73b2940767fe06de1642c..3f64b9f26e7df51f24254f2885d67c1f54648923 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1225,7 +1225,7 @@ EXPORT_SYMBOL(install_exec_creds);
  * - the caller must hold ->cred_guard_mutex to protect against
  *   PTRACE_ATTACH
  */
-int check_unsafe_exec(struct linux_binprm *bprm)
+static int check_unsafe_exec(struct linux_binprm *bprm)
 {
        struct task_struct *p = current, *t;
        unsigned n_fs;
index fe327c20af8372b4f3ce5c7e42e369b81ab440ba..839d3f9e91739d5283232addd4dd9134804b9e57 100644 (file)
@@ -20,14 +20,8 @@ struct path;
  * block_dev.c
  */
 #ifdef CONFIG_BLOCK
-extern struct super_block *blockdev_superblock;
 extern void __init bdev_cache_init(void);
 
-static inline int sb_is_blkdev_sb(struct super_block *sb)
-{
-       return sb == blockdev_superblock;
-}
-
 extern int __sync_blockdev(struct block_device *bdev, int wait);
 
 #else
@@ -35,11 +29,6 @@ static inline void bdev_cache_init(void)
 {
 }
 
-static inline int sb_is_blkdev_sb(struct super_block *sb)
-{
-       return 0;
-}
-
 static inline int __sync_blockdev(struct block_device *bdev, int wait)
 {
        return 0;
@@ -51,25 +40,14 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait)
  */
 extern void __init chrdev_init(void);
 
-/*
- * exec.c
- */
-extern int check_unsafe_exec(struct linux_binprm *);
-
 /*
  * namespace.c
  */
 extern int copy_mount_options(const void __user *, unsigned long *);
 extern int copy_mount_string(const void __user *, char **);
 
-extern unsigned int mnt_get_count(struct vfsmount *mnt);
 extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int);
 extern struct vfsmount *lookup_mnt(struct path *);
-extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
-                               struct vfsmount *);
-extern void release_mounts(struct list_head *);
-extern void umount_tree(struct vfsmount *, int, struct list_head *);
-extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
 extern int finish_automount(struct vfsmount *, struct path *);
 
 extern void mnt_make_longterm(struct vfsmount *);
@@ -98,8 +76,6 @@ extern struct file *get_empty_filp(void);
  */
 extern int do_remount_sb(struct super_block *, int, void *, int);
 extern bool grab_super_passive(struct super_block *sb);
-extern void __put_super(struct super_block *sb);
-extern void put_super(struct super_block *sb);
 extern struct dentry *mount_fs(struct file_system_type *,
                               int, const char *, void *);
 
index 1ea4ae1efcd3f898097a011360bb978c29f7b565..391287110274c02e84e142f179da60a381552105 100644 (file)
@@ -36,4 +36,10 @@ int propagate_umount(struct list_head *);
 int propagate_mount_busy(struct vfsmount *, int);
 void mnt_release_group_id(struct vfsmount *);
 int get_dominating_id(struct vfsmount *mnt, const struct path *root);
+unsigned int mnt_get_count(struct vfsmount *mnt);
+void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
+                       struct vfsmount *);
+void release_mounts(struct list_head *);
+void umount_tree(struct vfsmount *, int, struct list_head *);
+struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
 #endif /* _LINUX_PNODE_H */
index afd0f1ad45e052068499f7cc94699bef6fbc4084..66a12f9bfc2074d655625460e114fd1a5b106f65 100644 (file)
@@ -210,7 +210,7 @@ static inline void destroy_super(struct super_block *s)
 /*
  * Drop a superblock's refcount.  The caller must hold sb_lock.
  */
-void __put_super(struct super_block *sb)
+static void __put_super(struct super_block *sb)
 {
        if (!--sb->s_count) {
                list_del_init(&sb->s_list);
@@ -225,7 +225,7 @@ void __put_super(struct super_block *sb)
  *     Drops a temporary reference, frees superblock if there's no
  *     references left.
  */
-void put_super(struct super_block *sb)
+static void put_super(struct super_block *sb)
 {
        spin_lock(&sb_lock);
        __put_super(sb);