diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-08-27 22:25:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:13:13 -0400 |
commit | 6de24f0ed08054b2a202902e4d63beff27654db8 (patch) | |
tree | 91f378a0335b5b9756020d37e1c54bba4a2d6434 | |
parent | 8966c5e0fc867f5a7da5756b4cd1b8bbbed3d5dd (diff) |
[PATCH 1/2] anondev: init IDR statically
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
-rw-r--r-- | fs/super.c | 7 | ||||
-rw-r--r-- | include/linux/fs.h | 1 | ||||
-rw-r--r-- | init/main.c | 1 |
3 files changed, 1 insertions, 8 deletions
diff --git a/fs/super.c b/fs/super.c index e931ae9511fe..dd23bf927fbc 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -682,7 +682,7 @@ void emergency_remount(void) | |||
682 | * filesystems which don't use real block-devices. -- jrs | 682 | * filesystems which don't use real block-devices. -- jrs |
683 | */ | 683 | */ |
684 | 684 | ||
685 | static struct idr unnamed_dev_idr; | 685 | static DEFINE_IDR(unnamed_dev_idr); |
686 | static DEFINE_SPINLOCK(unnamed_dev_lock);/* protects the above */ | 686 | static DEFINE_SPINLOCK(unnamed_dev_lock);/* protects the above */ |
687 | 687 | ||
688 | int set_anon_super(struct super_block *s, void *data) | 688 | int set_anon_super(struct super_block *s, void *data) |
@@ -726,11 +726,6 @@ void kill_anon_super(struct super_block *sb) | |||
726 | 726 | ||
727 | EXPORT_SYMBOL(kill_anon_super); | 727 | EXPORT_SYMBOL(kill_anon_super); |
728 | 728 | ||
729 | void __init unnamed_dev_init(void) | ||
730 | { | ||
731 | idr_init(&unnamed_dev_idr); | ||
732 | } | ||
733 | |||
734 | void kill_litter_super(struct super_block *sb) | 729 | void kill_litter_super(struct super_block *sb) |
735 | { | 730 | { |
736 | if (sb->s_root) | 731 | if (sb->s_root) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index a6a625be13fc..5f70aa62cf0f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1593,7 +1593,6 @@ extern int get_sb_pseudo(struct file_system_type *, char *, | |||
1593 | struct vfsmount *mnt); | 1593 | struct vfsmount *mnt); |
1594 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); | 1594 | extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); |
1595 | int __put_super_and_need_restart(struct super_block *sb); | 1595 | int __put_super_and_need_restart(struct super_block *sb); |
1596 | void unnamed_dev_init(void); | ||
1597 | 1596 | ||
1598 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ | 1597 | /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ |
1599 | #define fops_get(fops) \ | 1598 | #define fops_get(fops) \ |
diff --git a/init/main.c b/init/main.c index 3e17a3bafe60..c6a1024a27a3 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -670,7 +670,6 @@ asmlinkage void __init start_kernel(void) | |||
670 | fork_init(num_physpages); | 670 | fork_init(num_physpages); |
671 | proc_caches_init(); | 671 | proc_caches_init(); |
672 | buffer_init(); | 672 | buffer_init(); |
673 | unnamed_dev_init(); | ||
674 | key_init(); | 673 | key_init(); |
675 | security_init(); | 674 | security_init(); |
676 | vfs_caches_init(num_physpages); | 675 | vfs_caches_init(num_physpages); |