Skip to contentSkip to conversation

BTRFS: Mark '__init' for btrfs_init_cachep, btrfs_init_sysfs,btrfs_interface_init

PATCH New Qinghuang Feng 1 participant 1 message Jan 15, 2009 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 BTRFS: Mark '__init' for btrfs_init_cachep, btrfs_init_sysfs,btrfs_interface_init

There functions are only called by 'static int __init init_btrfs_fs(void)', so also mark them as '__init'.

---

fs/btrfs/ctree.h +2 -2
index eee060f..7e03ec8 100644
@@ -2045,7 +2045,7 @@ int btrfs_write_inode(struct inode *inode, int wait);
 void btrfs_dirty_inode(struct inode *inode);
 struct inode *btrfs_alloc_inode(struct super_block *sb);
 void btrfs_destroy_inode(struct inode *inode);
-int btrfs_init_cachep(void);
+int __init btrfs_init_cachep(void);
 void btrfs_destroy_cachep(void);
 long btrfs_ioctl_trans_end(struct file *file);
 struct inode *btrfs_ilookup(struct super_block *s, u64 objectid,
@@ -2089,7 +2089,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
 			struct btrfs_root *root, int cache_only);
 
 /* sysfs.c */
-int btrfs_init_sysfs(void);
+int __init btrfs_init_sysfs(void);
 void btrfs_exit_sysfs(void);
 int btrfs_sysfs_add_super(struct btrfs_fs_info *fs);
 int btrfs_sysfs_add_root(struct btrfs_root *root);
fs/btrfs/inode.c +1 -1
index 8adfe05..7170c4a 100644
@@ -4521,7 +4521,7 @@ struct kmem_cache *btrfs_cache_create(const char *name, size_t size,
 				 SLAB_MEM_SPREAD | extra_flags), ctor);
 }
 
-int btrfs_init_cachep(void)
+int __init btrfs_init_cachep(void)
 {
 	btrfs_inode_cachep = btrfs_cache_create("btrfs_inode_cache",
 					  sizeof(struct btrfs_inode),
fs/btrfs/super.c +1 -1
index 0a14b49..0a3fc0d 100644
@@ -649,7 +649,7 @@ static struct miscdevice btrfs_misc = {
 	.fops		= &btrfs_ctl_fops
 };
 
-static int btrfs_interface_init(void)
+static int __init btrfs_interface_init(void)
 {
 	return misc_register(&btrfs_misc);
 }
fs/btrfs/sysfs.c +1 -1
index a240b6f..bd73c97 100644
@@ -254,7 +254,7 @@ void btrfs_sysfs_del_super(struct btrfs_fs_info *fs)
 	wait_for_completion(&fs->kobj_unregister);
 }
 
-int btrfs_init_sysfs(void)
+int __init btrfs_init_sysfs(void)
 {
 	btrfs_kset = kset_create_and_add("btrfs", NULL, fs_kobj);
 	if (!btrfs_kset)