mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
f2fs: avoid naming confusion of sysfs init
This patch changes the function names of sysfs init to follow ext4. f2fs_init_sysfs <-> f2fs_register_sysfs f2fs_exit_sysfs <-> f2fs_unregister_sysfs Suggested-by: Chao Yu <yuchao0@huawei.com> Reivewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
5c57132eaf
commit
dc6b205510
3 changed files with 14 additions and 14 deletions
|
@ -2820,10 +2820,10 @@ void destroy_extent_cache(void);
|
||||||
/*
|
/*
|
||||||
* sysfs.c
|
* sysfs.c
|
||||||
*/
|
*/
|
||||||
int __init f2fs_register_sysfs(void);
|
int __init f2fs_init_sysfs(void);
|
||||||
void f2fs_unregister_sysfs(void);
|
void f2fs_exit_sysfs(void);
|
||||||
int f2fs_init_sysfs(struct f2fs_sb_info *sbi);
|
int f2fs_register_sysfs(struct f2fs_sb_info *sbi);
|
||||||
void f2fs_exit_sysfs(struct f2fs_sb_info *sbi);
|
void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* crypto support
|
* crypto support
|
||||||
|
|
|
@ -649,7 +649,7 @@ static void f2fs_put_super(struct super_block *sb)
|
||||||
|
|
||||||
kfree(sbi->ckpt);
|
kfree(sbi->ckpt);
|
||||||
|
|
||||||
f2fs_exit_sysfs(sbi);
|
f2fs_unregister_sysfs(sbi);
|
||||||
|
|
||||||
sb->s_fs_info = NULL;
|
sb->s_fs_info = NULL;
|
||||||
if (sbi->s_chksum_driver)
|
if (sbi->s_chksum_driver)
|
||||||
|
@ -2145,7 +2145,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
goto free_root_inode;
|
goto free_root_inode;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = f2fs_init_sysfs(sbi);
|
err = f2fs_register_sysfs(sbi);
|
||||||
if (err)
|
if (err)
|
||||||
goto free_root_inode;
|
goto free_root_inode;
|
||||||
|
|
||||||
|
@ -2216,7 +2216,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
|
|
||||||
free_sysfs:
|
free_sysfs:
|
||||||
f2fs_sync_inode_meta(sbi);
|
f2fs_sync_inode_meta(sbi);
|
||||||
f2fs_exit_sysfs(sbi);
|
f2fs_unregister_sysfs(sbi);
|
||||||
free_root_inode:
|
free_root_inode:
|
||||||
dput(sb->s_root);
|
dput(sb->s_root);
|
||||||
sb->s_root = NULL;
|
sb->s_root = NULL;
|
||||||
|
@ -2334,7 +2334,7 @@ static int __init init_f2fs_fs(void)
|
||||||
err = create_extent_cache();
|
err = create_extent_cache();
|
||||||
if (err)
|
if (err)
|
||||||
goto free_checkpoint_caches;
|
goto free_checkpoint_caches;
|
||||||
err = f2fs_register_sysfs();
|
err = f2fs_init_sysfs();
|
||||||
if (err)
|
if (err)
|
||||||
goto free_extent_cache;
|
goto free_extent_cache;
|
||||||
err = register_shrinker(&f2fs_shrinker_info);
|
err = register_shrinker(&f2fs_shrinker_info);
|
||||||
|
@ -2353,7 +2353,7 @@ static int __init init_f2fs_fs(void)
|
||||||
free_shrinker:
|
free_shrinker:
|
||||||
unregister_shrinker(&f2fs_shrinker_info);
|
unregister_shrinker(&f2fs_shrinker_info);
|
||||||
free_sysfs:
|
free_sysfs:
|
||||||
f2fs_unregister_sysfs();
|
f2fs_exit_sysfs();
|
||||||
free_extent_cache:
|
free_extent_cache:
|
||||||
destroy_extent_cache();
|
destroy_extent_cache();
|
||||||
free_checkpoint_caches:
|
free_checkpoint_caches:
|
||||||
|
@ -2373,7 +2373,7 @@ static void __exit exit_f2fs_fs(void)
|
||||||
f2fs_destroy_root_stats();
|
f2fs_destroy_root_stats();
|
||||||
unregister_filesystem(&f2fs_fs_type);
|
unregister_filesystem(&f2fs_fs_type);
|
||||||
unregister_shrinker(&f2fs_shrinker_info);
|
unregister_shrinker(&f2fs_shrinker_info);
|
||||||
f2fs_unregister_sysfs();
|
f2fs_exit_sysfs();
|
||||||
destroy_extent_cache();
|
destroy_extent_cache();
|
||||||
destroy_checkpoint_caches();
|
destroy_checkpoint_caches();
|
||||||
destroy_segment_manager_caches();
|
destroy_segment_manager_caches();
|
||||||
|
|
|
@ -304,7 +304,7 @@ static const struct file_operations f2fs_seq_##_name##_fops = { \
|
||||||
F2FS_PROC_FILE_DEF(segment_info);
|
F2FS_PROC_FILE_DEF(segment_info);
|
||||||
F2FS_PROC_FILE_DEF(segment_bits);
|
F2FS_PROC_FILE_DEF(segment_bits);
|
||||||
|
|
||||||
int __init f2fs_register_sysfs(void)
|
int __init f2fs_init_sysfs(void)
|
||||||
{
|
{
|
||||||
f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
|
f2fs_proc_root = proc_mkdir("fs/f2fs", NULL);
|
||||||
|
|
||||||
|
@ -314,13 +314,13 @@ int __init f2fs_register_sysfs(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void f2fs_unregister_sysfs(void)
|
void f2fs_exit_sysfs(void)
|
||||||
{
|
{
|
||||||
kset_unregister(f2fs_kset);
|
kset_unregister(f2fs_kset);
|
||||||
remove_proc_entry("fs/f2fs", NULL);
|
remove_proc_entry("fs/f2fs", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
int f2fs_init_sysfs(struct f2fs_sb_info *sbi)
|
int f2fs_register_sysfs(struct f2fs_sb_info *sbi)
|
||||||
{
|
{
|
||||||
struct super_block *sb = sbi->sb;
|
struct super_block *sb = sbi->sb;
|
||||||
int err;
|
int err;
|
||||||
|
@ -351,7 +351,7 @@ int f2fs_init_sysfs(struct f2fs_sb_info *sbi)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
void f2fs_exit_sysfs(struct f2fs_sb_info *sbi)
|
void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi)
|
||||||
{
|
{
|
||||||
kobject_del(&sbi->s_kobj);
|
kobject_del(&sbi->s_kobj);
|
||||||
kobject_put(&sbi->s_kobj);
|
kobject_put(&sbi->s_kobj);
|
||||||
|
|
Loading…
Reference in a new issue