Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH 1/2] anondev: init IDR statically

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

authored by

Alexey Dobriyan and committed by
Al Viro
6de24f0e 8966c5e0

+1 -8
+1 -6
fs/super.c
··· 682 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 686 static DEFINE_SPINLOCK(unnamed_dev_lock);/* protects the above */ 687 687 688 688 int set_anon_super(struct super_block *s, void *data) ··· 725 725 } 726 726 727 727 EXPORT_SYMBOL(kill_anon_super); 728 - 729 - void __init unnamed_dev_init(void) 730 - { 731 - idr_init(&unnamed_dev_idr); 732 - } 733 728 734 729 void kill_litter_super(struct super_block *sb) 735 730 {
-1
include/linux/fs.h
··· 1593 1593 struct vfsmount *mnt); 1594 1594 extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); 1595 1595 int __put_super_and_need_restart(struct super_block *sb); 1596 - void unnamed_dev_init(void); 1597 1596 1598 1597 /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ 1599 1598 #define fops_get(fops) \
-1
init/main.c
··· 670 670 fork_init(num_physpages); 671 671 proc_caches_init(); 672 672 buffer_init(); 673 - unnamed_dev_init(); 674 673 key_init(); 675 674 security_init(); 676 675 vfs_caches_init(num_physpages);