Skip to content

Commit b7de231

Browse files
Eric SandeenJaegeuk Kim
authored andcommitted
f2fs: pass sbi rather than sb to quota qf_name helpers
With the new mount api we will not have the superblock available during option parsing. Prepare for this by passing *sbi rather than *sb. For now, we are parsing after fill_super has been done, so sbi->sb will exist. Under the new mount API this will require more care, but do the simple change for now. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 9cca498 commit b7de231

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

fs/f2fs/super.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ static void init_once(void *foo)
386386
#ifdef CONFIG_QUOTA
387387
static const char * const quotatypes[] = INITQFNAMES;
388388
#define QTYPE2NAME(t) (quotatypes[t])
389-
static int f2fs_set_qf_name(struct super_block *sb, int qtype,
389+
static int f2fs_set_qf_name(struct f2fs_sb_info *sbi, int qtype,
390390
substring_t *args)
391391
{
392-
struct f2fs_sb_info *sbi = F2FS_SB(sb);
392+
struct super_block *sb = sbi->sb;
393393
char *qname;
394394
int ret = -EINVAL;
395395

@@ -427,9 +427,9 @@ static int f2fs_set_qf_name(struct super_block *sb, int qtype,
427427
return ret;
428428
}
429429

430-
static int f2fs_clear_qf_name(struct super_block *sb, int qtype)
430+
static int f2fs_clear_qf_name(struct f2fs_sb_info *sbi, int qtype)
431431
{
432-
struct f2fs_sb_info *sbi = F2FS_SB(sb);
432+
struct super_block *sb = sbi->sb;
433433

434434
if (sb_any_quota_loaded(sb) && F2FS_OPTION(sbi).s_qf_names[qtype]) {
435435
f2fs_err(sbi, "Cannot change journaled quota options when quota turned on");
@@ -934,32 +934,32 @@ static int parse_options(struct super_block *sb, char *options, bool is_remount)
934934
set_opt(sbi, PRJQUOTA);
935935
break;
936936
case Opt_usrjquota:
937-
ret = f2fs_set_qf_name(sb, USRQUOTA, &args[0]);
937+
ret = f2fs_set_qf_name(sbi, USRQUOTA, &args[0]);
938938
if (ret)
939939
return ret;
940940
break;
941941
case Opt_grpjquota:
942-
ret = f2fs_set_qf_name(sb, GRPQUOTA, &args[0]);
942+
ret = f2fs_set_qf_name(sbi, GRPQUOTA, &args[0]);
943943
if (ret)
944944
return ret;
945945
break;
946946
case Opt_prjjquota:
947-
ret = f2fs_set_qf_name(sb, PRJQUOTA, &args[0]);
947+
ret = f2fs_set_qf_name(sbi, PRJQUOTA, &args[0]);
948948
if (ret)
949949
return ret;
950950
break;
951951
case Opt_offusrjquota:
952-
ret = f2fs_clear_qf_name(sb, USRQUOTA);
952+
ret = f2fs_clear_qf_name(sbi, USRQUOTA);
953953
if (ret)
954954
return ret;
955955
break;
956956
case Opt_offgrpjquota:
957-
ret = f2fs_clear_qf_name(sb, GRPQUOTA);
957+
ret = f2fs_clear_qf_name(sbi, GRPQUOTA);
958958
if (ret)
959959
return ret;
960960
break;
961961
case Opt_offprjjquota:
962-
ret = f2fs_clear_qf_name(sb, PRJQUOTA);
962+
ret = f2fs_clear_qf_name(sbi, PRJQUOTA);
963963
if (ret)
964964
return ret;
965965
break;

0 commit comments

Comments
 (0)