Commit 5dabfc78 authored by Theodore Ts'o's avatar Theodore Ts'o

ext4: rename {exit,init}_ext4_*() to ext4_{exit,init}_*()

This is a cleanup to avoid namespace leaks out of fs/ext4
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 7f93cff9
...@@ -29,7 +29,7 @@ struct ext4_system_zone { ...@@ -29,7 +29,7 @@ struct ext4_system_zone {
static struct kmem_cache *ext4_system_zone_cachep; static struct kmem_cache *ext4_system_zone_cachep;
int __init init_ext4_system_zone(void) int __init ext4_init_system_zone(void)
{ {
ext4_system_zone_cachep = KMEM_CACHE(ext4_system_zone, 0); ext4_system_zone_cachep = KMEM_CACHE(ext4_system_zone, 0);
if (ext4_system_zone_cachep == NULL) if (ext4_system_zone_cachep == NULL)
...@@ -37,7 +37,7 @@ int __init init_ext4_system_zone(void) ...@@ -37,7 +37,7 @@ int __init init_ext4_system_zone(void)
return 0; return 0;
} }
void exit_ext4_system_zone(void) void ext4_exit_system_zone(void)
{ {
kmem_cache_destroy(ext4_system_zone_cachep); kmem_cache_destroy(ext4_system_zone_cachep);
} }
......
...@@ -1684,8 +1684,8 @@ extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *, ...@@ -1684,8 +1684,8 @@ extern ext4_fsblk_t ext4_mb_new_blocks(handle_t *,
struct ext4_allocation_request *, int *); struct ext4_allocation_request *, int *);
extern int ext4_mb_reserve_blocks(struct super_block *, int); extern int ext4_mb_reserve_blocks(struct super_block *, int);
extern void ext4_discard_preallocations(struct inode *); extern void ext4_discard_preallocations(struct inode *);
extern int __init init_ext4_mballoc(void); extern int __init ext4_init_mballoc(void);
extern void exit_ext4_mballoc(void); extern void ext4_exit_mballoc(void);
extern void ext4_free_blocks(handle_t *handle, struct inode *inode, extern void ext4_free_blocks(handle_t *handle, struct inode *inode,
struct buffer_head *bh, ext4_fsblk_t block, struct buffer_head *bh, ext4_fsblk_t block,
unsigned long count, int flags); unsigned long count, int flags);
...@@ -2040,8 +2040,8 @@ extern const struct inode_operations ext4_fast_symlink_inode_operations; ...@@ -2040,8 +2040,8 @@ extern const struct inode_operations ext4_fast_symlink_inode_operations;
/* block_validity */ /* block_validity */
extern void ext4_release_system_zone(struct super_block *sb); extern void ext4_release_system_zone(struct super_block *sb);
extern int ext4_setup_system_zone(struct super_block *sb); extern int ext4_setup_system_zone(struct super_block *sb);
extern int __init init_ext4_system_zone(void); extern int __init ext4_init_system_zone(void);
extern void exit_ext4_system_zone(void); extern void ext4_exit_system_zone(void);
extern int ext4_data_block_valid(struct ext4_sb_info *sbi, extern int ext4_data_block_valid(struct ext4_sb_info *sbi,
ext4_fsblk_t start_blk, ext4_fsblk_t start_blk,
unsigned int count); unsigned int count);
...@@ -2070,8 +2070,8 @@ extern int ext4_move_extents(struct file *o_filp, struct file *d_filp, ...@@ -2070,8 +2070,8 @@ extern int ext4_move_extents(struct file *o_filp, struct file *d_filp,
__u64 len, __u64 *moved_len); __u64 len, __u64 *moved_len);
/* page-io.c */ /* page-io.c */
extern int __init init_ext4_pageio(void); extern int __init ext4_init_pageio(void);
extern void exit_ext4_pageio(void); extern void ext4_exit_pageio(void);
extern void ext4_free_io_end(ext4_io_end_t *io); extern void ext4_free_io_end(ext4_io_end_t *io);
extern ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags); extern ext4_io_end_t *ext4_init_io_end(struct inode *inode, gfp_t flags);
extern int ext4_end_io_nolock(ext4_io_end_t *io); extern int ext4_end_io_nolock(ext4_io_end_t *io);
......
...@@ -2705,7 +2705,7 @@ static void ext4_remove_debugfs_entry(void) ...@@ -2705,7 +2705,7 @@ static void ext4_remove_debugfs_entry(void)
#endif #endif
int __init init_ext4_mballoc(void) int __init ext4_init_mballoc(void)
{ {
ext4_pspace_cachep = KMEM_CACHE(ext4_prealloc_space, ext4_pspace_cachep = KMEM_CACHE(ext4_prealloc_space,
SLAB_RECLAIM_ACCOUNT); SLAB_RECLAIM_ACCOUNT);
...@@ -2730,7 +2730,7 @@ int __init init_ext4_mballoc(void) ...@@ -2730,7 +2730,7 @@ int __init init_ext4_mballoc(void)
return 0; return 0;
} }
void exit_ext4_mballoc(void) void ext4_exit_mballoc(void)
{ {
int i; int i;
/* /*
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static struct kmem_cache *io_page_cachep, *io_end_cachep; static struct kmem_cache *io_page_cachep, *io_end_cachep;
int __init init_ext4_pageio(void) int __init ext4_init_pageio(void)
{ {
io_page_cachep = KMEM_CACHE(ext4_io_page, SLAB_RECLAIM_ACCOUNT); io_page_cachep = KMEM_CACHE(ext4_io_page, SLAB_RECLAIM_ACCOUNT);
if (io_page_cachep == NULL) if (io_page_cachep == NULL)
...@@ -46,7 +46,7 @@ int __init init_ext4_pageio(void) ...@@ -46,7 +46,7 @@ int __init init_ext4_pageio(void)
return 0; return 0;
} }
void exit_ext4_pageio(void) void ext4_exit_pageio(void)
{ {
kmem_cache_destroy(io_end_cachep); kmem_cache_destroy(io_end_cachep);
kmem_cache_destroy(io_page_cachep); kmem_cache_destroy(io_page_cachep);
......
...@@ -4770,15 +4770,15 @@ int __init ext4_init_feat_adverts(void) ...@@ -4770,15 +4770,15 @@ int __init ext4_init_feat_adverts(void)
return ret; return ret;
} }
static int __init init_ext4_fs(void) static int __init ext4_init_fs(void)
{ {
int err; int err;
ext4_check_flag_values(); ext4_check_flag_values();
err = init_ext4_pageio(); err = ext4_init_pageio();
if (err) if (err)
return err; return err;
err = init_ext4_system_zone(); err = ext4_init_system_zone();
if (err) if (err)
goto out5; goto out5;
ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj); ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
...@@ -4788,11 +4788,11 @@ static int __init init_ext4_fs(void) ...@@ -4788,11 +4788,11 @@ static int __init init_ext4_fs(void)
err = ext4_init_feat_adverts(); err = ext4_init_feat_adverts();
err = init_ext4_mballoc(); err = ext4_init_mballoc();
if (err) if (err)
goto out3; goto out3;
err = init_ext4_xattr(); err = ext4_init_xattr();
if (err) if (err)
goto out2; goto out2;
err = init_inodecache(); err = init_inodecache();
...@@ -4812,37 +4812,37 @@ static int __init init_ext4_fs(void) ...@@ -4812,37 +4812,37 @@ static int __init init_ext4_fs(void)
unregister_as_ext3(); unregister_as_ext3();
destroy_inodecache(); destroy_inodecache();
out1: out1:
exit_ext4_xattr(); ext4_exit_xattr();
out2: out2:
exit_ext4_mballoc(); ext4_exit_mballoc();
out3: out3:
kfree(ext4_feat); kfree(ext4_feat);
remove_proc_entry("fs/ext4", NULL); remove_proc_entry("fs/ext4", NULL);
kset_unregister(ext4_kset); kset_unregister(ext4_kset);
out4: out4:
exit_ext4_system_zone(); ext4_exit_system_zone();
out5: out5:
exit_ext4_pageio(); ext4_exit_pageio();
return err; return err;
} }
static void __exit exit_ext4_fs(void) static void __exit ext4_exit_fs(void)
{ {
ext4_destroy_lazyinit_thread(); ext4_destroy_lazyinit_thread();
unregister_as_ext2(); unregister_as_ext2();
unregister_as_ext3(); unregister_as_ext3();
unregister_filesystem(&ext4_fs_type); unregister_filesystem(&ext4_fs_type);
destroy_inodecache(); destroy_inodecache();
exit_ext4_xattr(); ext4_exit_xattr();
exit_ext4_mballoc(); ext4_exit_mballoc();
remove_proc_entry("fs/ext4", NULL); remove_proc_entry("fs/ext4", NULL);
kset_unregister(ext4_kset); kset_unregister(ext4_kset);
exit_ext4_system_zone(); ext4_exit_system_zone();
exit_ext4_pageio(); ext4_exit_pageio();
} }
MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
MODULE_DESCRIPTION("Fourth Extended Filesystem"); MODULE_DESCRIPTION("Fourth Extended Filesystem");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_init(init_ext4_fs) module_init(ext4_init_fs)
module_exit(exit_ext4_fs) module_exit(ext4_exit_fs)
...@@ -1588,7 +1588,7 @@ static void ext4_xattr_rehash(struct ext4_xattr_header *header, ...@@ -1588,7 +1588,7 @@ static void ext4_xattr_rehash(struct ext4_xattr_header *header,
#undef BLOCK_HASH_SHIFT #undef BLOCK_HASH_SHIFT
int __init int __init
init_ext4_xattr(void) ext4_init_xattr(void)
{ {
ext4_xattr_cache = mb_cache_create("ext4_xattr", 6); ext4_xattr_cache = mb_cache_create("ext4_xattr", 6);
if (!ext4_xattr_cache) if (!ext4_xattr_cache)
...@@ -1597,7 +1597,7 @@ init_ext4_xattr(void) ...@@ -1597,7 +1597,7 @@ init_ext4_xattr(void)
} }
void void
exit_ext4_xattr(void) ext4_exit_xattr(void)
{ {
if (ext4_xattr_cache) if (ext4_xattr_cache)
mb_cache_destroy(ext4_xattr_cache); mb_cache_destroy(ext4_xattr_cache);
......
...@@ -83,8 +83,8 @@ extern void ext4_xattr_put_super(struct super_block *); ...@@ -83,8 +83,8 @@ extern void ext4_xattr_put_super(struct super_block *);
extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize, extern int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
struct ext4_inode *raw_inode, handle_t *handle); struct ext4_inode *raw_inode, handle_t *handle);
extern int init_ext4_xattr(void); extern int __init ext4_init_xattr(void);
extern void exit_ext4_xattr(void); extern void ext4_exit_xattr(void);
extern const struct xattr_handler *ext4_xattr_handlers[]; extern const struct xattr_handler *ext4_xattr_handlers[];
...@@ -121,14 +121,14 @@ ext4_xattr_put_super(struct super_block *sb) ...@@ -121,14 +121,14 @@ ext4_xattr_put_super(struct super_block *sb)
{ {
} }
static inline int static __init inline int
init_ext4_xattr(void) init_ext4_xattr(void)
{ {
return 0; return 0;
} }
static inline void static inline void
exit_ext4_xattr(void) ext4_exit_xattr(void)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment