diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-11-21 21:15:42 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-03 22:52:35 -0500 |
commit | f47ec3f28354795f000c14bf18ed967ec81a3ec3 (patch) | |
tree | 662d479706bd948963ad3f9f00c2e6caedbe5a92 | |
parent | 5ede7b1cfa8201418fb35e12f770e9e7c2559a4d (diff) |
trim fs/internal.h
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>
-rw-r--r-- | fs/block_dev.c | 7 | ||||
-rw-r--r-- | fs/exec.c | 2 | ||||
-rw-r--r-- | fs/internal.h | 24 | ||||
-rw-r--r-- | fs/pnode.h | 6 | ||||
-rw-r--r-- | fs/super.c | 4 |
5 files changed, 15 insertions, 28 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c index b07f1da1de4e..4b322a58a513 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c | |||
@@ -493,7 +493,7 @@ static struct file_system_type bd_type = { | |||
493 | .kill_sb = kill_anon_super, | 493 | .kill_sb = kill_anon_super, |
494 | }; | 494 | }; |
495 | 495 | ||
496 | struct super_block *blockdev_superblock __read_mostly; | 496 | static struct super_block *blockdev_superblock __read_mostly; |
497 | 497 | ||
498 | void __init bdev_cache_init(void) | 498 | void __init bdev_cache_init(void) |
499 | { | 499 | { |
@@ -639,6 +639,11 @@ static struct block_device *bd_acquire(struct inode *inode) | |||
639 | return bdev; | 639 | return bdev; |
640 | } | 640 | } |
641 | 641 | ||
642 | static inline int sb_is_blkdev_sb(struct super_block *sb) | ||
643 | { | ||
644 | return sb == blockdev_superblock; | ||
645 | } | ||
646 | |||
642 | /* Call when you free inode */ | 647 | /* Call when you free inode */ |
643 | 648 | ||
644 | void bd_forget(struct inode *inode) | 649 | void bd_forget(struct inode *inode) |
@@ -1225,7 +1225,7 @@ EXPORT_SYMBOL(install_exec_creds); | |||
1225 | * - the caller must hold ->cred_guard_mutex to protect against | 1225 | * - the caller must hold ->cred_guard_mutex to protect against |
1226 | * PTRACE_ATTACH | 1226 | * PTRACE_ATTACH |
1227 | */ | 1227 | */ |
1228 | int check_unsafe_exec(struct linux_binprm *bprm) | 1228 | static int check_unsafe_exec(struct linux_binprm *bprm) |
1229 | { | 1229 | { |
1230 | struct task_struct *p = current, *t; | 1230 | struct task_struct *p = current, *t; |
1231 | unsigned n_fs; | 1231 | unsigned n_fs; |
diff --git a/fs/internal.h b/fs/internal.h index fe327c20af83..839d3f9e9173 100644 --- a/fs/internal.h +++ b/fs/internal.h | |||
@@ -20,14 +20,8 @@ struct path; | |||
20 | * block_dev.c | 20 | * block_dev.c |
21 | */ | 21 | */ |
22 | #ifdef CONFIG_BLOCK | 22 | #ifdef CONFIG_BLOCK |
23 | extern struct super_block *blockdev_superblock; | ||
24 | extern void __init bdev_cache_init(void); | 23 | extern void __init bdev_cache_init(void); |
25 | 24 | ||
26 | static inline int sb_is_blkdev_sb(struct super_block *sb) | ||
27 | { | ||
28 | return sb == blockdev_superblock; | ||
29 | } | ||
30 | |||
31 | extern int __sync_blockdev(struct block_device *bdev, int wait); | 25 | extern int __sync_blockdev(struct block_device *bdev, int wait); |
32 | 26 | ||
33 | #else | 27 | #else |
@@ -35,11 +29,6 @@ static inline void bdev_cache_init(void) | |||
35 | { | 29 | { |
36 | } | 30 | } |
37 | 31 | ||
38 | static inline int sb_is_blkdev_sb(struct super_block *sb) | ||
39 | { | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | static inline int __sync_blockdev(struct block_device *bdev, int wait) | 32 | static inline int __sync_blockdev(struct block_device *bdev, int wait) |
44 | { | 33 | { |
45 | return 0; | 34 | return 0; |
@@ -52,24 +41,13 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait) | |||
52 | extern void __init chrdev_init(void); | 41 | extern void __init chrdev_init(void); |
53 | 42 | ||
54 | /* | 43 | /* |
55 | * exec.c | ||
56 | */ | ||
57 | extern int check_unsafe_exec(struct linux_binprm *); | ||
58 | |||
59 | /* | ||
60 | * namespace.c | 44 | * namespace.c |
61 | */ | 45 | */ |
62 | extern int copy_mount_options(const void __user *, unsigned long *); | 46 | extern int copy_mount_options(const void __user *, unsigned long *); |
63 | extern int copy_mount_string(const void __user *, char **); | 47 | extern int copy_mount_string(const void __user *, char **); |
64 | 48 | ||
65 | extern unsigned int mnt_get_count(struct vfsmount *mnt); | ||
66 | extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int); | 49 | extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int); |
67 | extern struct vfsmount *lookup_mnt(struct path *); | 50 | extern struct vfsmount *lookup_mnt(struct path *); |
68 | extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | ||
69 | struct vfsmount *); | ||
70 | extern void release_mounts(struct list_head *); | ||
71 | extern void umount_tree(struct vfsmount *, int, struct list_head *); | ||
72 | extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); | ||
73 | extern int finish_automount(struct vfsmount *, struct path *); | 51 | extern int finish_automount(struct vfsmount *, struct path *); |
74 | 52 | ||
75 | extern void mnt_make_longterm(struct vfsmount *); | 53 | extern void mnt_make_longterm(struct vfsmount *); |
@@ -98,8 +76,6 @@ extern struct file *get_empty_filp(void); | |||
98 | */ | 76 | */ |
99 | extern int do_remount_sb(struct super_block *, int, void *, int); | 77 | extern int do_remount_sb(struct super_block *, int, void *, int); |
100 | extern bool grab_super_passive(struct super_block *sb); | 78 | extern bool grab_super_passive(struct super_block *sb); |
101 | extern void __put_super(struct super_block *sb); | ||
102 | extern void put_super(struct super_block *sb); | ||
103 | extern struct dentry *mount_fs(struct file_system_type *, | 79 | extern struct dentry *mount_fs(struct file_system_type *, |
104 | int, const char *, void *); | 80 | int, const char *, void *); |
105 | 81 | ||
diff --git a/fs/pnode.h b/fs/pnode.h index 1ea4ae1efcd3..391287110274 100644 --- a/fs/pnode.h +++ b/fs/pnode.h | |||
@@ -36,4 +36,10 @@ int propagate_umount(struct list_head *); | |||
36 | int propagate_mount_busy(struct vfsmount *, int); | 36 | int propagate_mount_busy(struct vfsmount *, int); |
37 | void mnt_release_group_id(struct vfsmount *); | 37 | void mnt_release_group_id(struct vfsmount *); |
38 | int get_dominating_id(struct vfsmount *mnt, const struct path *root); | 38 | int get_dominating_id(struct vfsmount *mnt, const struct path *root); |
39 | unsigned int mnt_get_count(struct vfsmount *mnt); | ||
40 | void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | ||
41 | struct vfsmount *); | ||
42 | void release_mounts(struct list_head *); | ||
43 | void umount_tree(struct vfsmount *, int, struct list_head *); | ||
44 | struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); | ||
39 | #endif /* _LINUX_PNODE_H */ | 45 | #endif /* _LINUX_PNODE_H */ |
diff --git a/fs/super.c b/fs/super.c index afd0f1ad45e0..66a12f9bfc20 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -210,7 +210,7 @@ static inline void destroy_super(struct super_block *s) | |||
210 | /* | 210 | /* |
211 | * Drop a superblock's refcount. The caller must hold sb_lock. | 211 | * Drop a superblock's refcount. The caller must hold sb_lock. |
212 | */ | 212 | */ |
213 | void __put_super(struct super_block *sb) | 213 | static void __put_super(struct super_block *sb) |
214 | { | 214 | { |
215 | if (!--sb->s_count) { | 215 | if (!--sb->s_count) { |
216 | list_del_init(&sb->s_list); | 216 | list_del_init(&sb->s_list); |
@@ -225,7 +225,7 @@ void __put_super(struct super_block *sb) | |||
225 | * Drops a temporary reference, frees superblock if there's no | 225 | * Drops a temporary reference, frees superblock if there's no |
226 | * references left. | 226 | * references left. |
227 | */ | 227 | */ |
228 | void put_super(struct super_block *sb) | 228 | static void put_super(struct super_block *sb) |
229 | { | 229 | { |
230 | spin_lock(&sb_lock); | 230 | spin_lock(&sb_lock); |
231 | __put_super(sb); | 231 | __put_super(sb); |