Skip to content

Commit bb463a7

Browse files
Hongbo LiJaegeuk Kim
authored andcommitted
f2fs: introduce fs_context_operation structure
The handle_mount_opt() helper is used to parse mount parameters, and so we can rename this function to f2fs_parse_param() and set it as .param_param in fs_context_operations. Signed-off-by: Hongbo Li <[email protected]> [sandeen: forward port] Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent d185351 commit bb463a7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fs/f2fs/super.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ static int f2fs_set_zstd_level(struct f2fs_fs_context *ctx, const char *str)
700700
#endif
701701
#endif
702702

703-
static int handle_mount_opt(struct fs_context *fc, struct fs_parameter *param)
703+
static int f2fs_parse_param(struct fs_context *fc, struct fs_parameter *param)
704704
{
705705
struct f2fs_fs_context *ctx = fc->fs_private;
706706
#ifdef CONFIG_F2FS_FS_COMPRESSION
@@ -1171,7 +1171,7 @@ static int parse_options(struct fs_context *fc, char *options)
11711171
param.key = key;
11721172
param.size = v_len;
11731173

1174-
ret = handle_mount_opt(fc, &param);
1174+
ret = f2fs_parse_param(fc, &param);
11751175
kfree(param.string);
11761176
if (ret < 0)
11771177
return ret;
@@ -5352,6 +5352,10 @@ static struct dentry *f2fs_mount(struct file_system_type *fs_type, int flags,
53525352
return mount_bdev(fs_type, flags, dev_name, data, f2fs_fill_super);
53535353
}
53545354

5355+
static const struct fs_context_operations f2fs_context_ops = {
5356+
.parse_param = f2fs_parse_param,
5357+
};
5358+
53555359
static void kill_f2fs_super(struct super_block *sb)
53565360
{
53575361
struct f2fs_sb_info *sbi = F2FS_SB(sb);

0 commit comments

Comments
 (0)