aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2017-07-26 11:24:13 -0700
committerMister Oyster <oysterized@gmail.com>2017-10-04 15:23:50 +0200
commit56da2af974fc705c5220868a58522e330bad5981 (patch)
treebe99d9ed6cdb5533665fe95927bc2fb1eae26036
parentb404bc44dbc1df424a3853b13eee44036fe5a85c (diff)
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>
-rw-r--r--fs/f2fs/f2fs.h8
-rw-r--r--fs/f2fs/super.c12
-rw-r--r--fs/f2fs/sysfs.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 1cf12c64d..ebe5284f6 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -2958,10 +2958,10 @@ void destroy_extent_cache(void);
/*
* sysfs.c
*/
-int __init f2fs_register_sysfs(void);
-void f2fs_unregister_sysfs(void);
-int f2fs_init_sysfs(struct f2fs_sb_info *sbi);
-void f2fs_exit_sysfs(struct f2fs_sb_info *sbi);
+int __init f2fs_init_sysfs(void);
+void f2fs_exit_sysfs(void);
+int f2fs_register_sysfs(struct f2fs_sb_info *sbi);
+void f2fs_unregister_sysfs(struct f2fs_sb_info *sbi);
/*
* crypto support
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c87008321..81e8b8577 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -652,7 +652,7 @@ static void f2fs_put_super(struct super_block *sb)
kfree(sbi->ckpt);
- f2fs_exit_sysfs(sbi);
+ f2fs_unregister_sysfs(sbi);
sb->s_fs_info = NULL;
if (sbi->s_chksum_driver)
@@ -2151,7 +2151,7 @@ try_onemore:
goto free_root_inode;
}
- err = f2fs_init_sysfs(sbi);
+ err = f2fs_register_sysfs(sbi);
if (err)
goto free_root_inode;
@@ -2222,7 +2222,7 @@ skip_recovery:
free_sysfs:
f2fs_sync_inode_meta(sbi);
- f2fs_exit_sysfs(sbi);
+ f2fs_unregister_sysfs(sbi);
free_root_inode:
dput(sb->s_root);
sb->s_root = NULL;
@@ -2340,7 +2340,7 @@ static int __init init_f2fs_fs(void)
err = create_extent_cache();
if (err)
goto free_checkpoint_caches;
- err = f2fs_register_sysfs();
+ err = f2fs_init_sysfs();
if (err)
goto free_extent_cache;
@@ -2358,7 +2358,7 @@ free_filesystem:
unregister_filesystem(&f2fs_fs_type);
free_shrinker:
unregister_shrinker(&f2fs_shrinker_info);
- f2fs_unregister_sysfs();
+ f2fs_exit_sysfs();
free_extent_cache:
destroy_extent_cache();
free_checkpoint_caches:
@@ -2378,7 +2378,7 @@ static void __exit exit_f2fs_fs(void)
f2fs_destroy_root_stats();
unregister_filesystem(&f2fs_fs_type);
unregister_shrinker(&f2fs_shrinker_info);
- f2fs_unregister_sysfs();
+ f2fs_exit_sysfs();
destroy_extent_cache();
destroy_checkpoint_caches();
destroy_segment_manager_caches();
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index a96fd1945..ad5845dd0 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -327,7 +327,7 @@ static const struct file_operations f2fs_seq_##_name##_fops = { \
F2FS_PROC_FILE_DEF(segment_info);
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);
@@ -337,13 +337,13 @@ int __init f2fs_register_sysfs(void)
return 0;
}
-void f2fs_unregister_sysfs(void)
+void f2fs_exit_sysfs(void)
{
kset_unregister(f2fs_kset);
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;
int err;
@@ -374,7 +374,7 @@ err_out:
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_put(&sbi->s_kobj);