Skip to content

Commit 71e9bd3

Browse files
Eric SandeenJaegeuk Kim
authored andcommitted
f2fs: pass sbi rather than sb to parse_options()
With the new mount API the sb will not be available during initial option parsing, which will happen before fill_super reads sb from disk. Now that the sb is no longer directly referenced in parse_options, switch it to use sbi. (Note that all calls to f2fs_sb_has_* originating from parse_options will need to be deferred to later before we can use the new mount API.) Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent b7de231 commit 71e9bd3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/f2fs/super.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,8 @@ static int f2fs_set_zstd_level(struct f2fs_sb_info *sbi, const char *str)
673673
#endif
674674
#endif
675675

676-
static int parse_options(struct super_block *sb, char *options, bool is_remount)
676+
static int parse_options(struct f2fs_sb_info *sbi, char *options, bool is_remount)
677677
{
678-
struct f2fs_sb_info *sbi = F2FS_SB(sb);
679678
substring_t args[MAX_OPT_ARGS];
680679
#ifdef CONFIG_F2FS_FS_COMPRESSION
681680
unsigned char (*ext)[F2FS_EXTENSION_LEN];
@@ -2376,7 +2375,7 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data)
23762375
default_options(sbi, true);
23772376

23782377
/* parse mount options */
2379-
err = parse_options(sb, data, true);
2378+
err = parse_options(sbi, data, true);
23802379
if (err)
23812380
goto restore_opts;
23822381

@@ -4546,7 +4545,7 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
45464545
goto free_sb_buf;
45474546
}
45484547

4549-
err = parse_options(sb, options, false);
4548+
err = parse_options(sbi, options, false);
45504549
if (err)
45514550
goto free_options;
45524551

0 commit comments

Comments
 (0)