Skip to content

Commit ff11d87

Browse files
chaseyuJaegeuk Kim
authored andcommitted
f2fs: fix to allow removing qf_name
The mount behavior changed after commit d185351 ("f2fs: separate the options parsing and options checking"), let's fix it. [Scripts] mkfs.f2fs -f /dev/vdb mount -t f2fs -o usrquota /dev/vdb /mnt/f2fs quotacheck -uc /mnt/f2fs umount /mnt/f2fs mount -t f2fs -o usrjquota=aquota.user,jqfmt=vfsold /dev/vdb /mnt/f2fs mount|grep f2fs mount -t f2fs -o remount,usrjquota=,jqfmt=vfsold /dev/vdb /mnt/f2fs mount|grep f2fs dmesg [Before commit] mount#1: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,... mount#2: ...,quota,jqfmt=vfsold,... kmsg: no output [After commit] mount#1: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,... mount#2: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,... kmsg: "user quota file already specified" [After patch] mount#1: ...,quota,jqfmt=vfsold,usrjquota=aquota.user,... mount#2: ...,quota,jqfmt=vfsold,... kmsg: "remove qf_name aquota.user" Fixes: d185351 ("f2fs: separate the options parsing and options checking") Cc: Hongbo Li <[email protected]> Signed-off-by: Chao Yu <[email protected]> Reviewed-by: Hongbo Li <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 930a9a6 commit ff11d87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

fs/f2fs/super.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,8 +1219,11 @@ static int f2fs_check_quota_consistency(struct fs_context *fc,
12191219
goto err_jquota_change;
12201220

12211221
if (old_qname) {
1222-
if (new_qname &&
1223-
strcmp(old_qname, new_qname) == 0) {
1222+
if (!new_qname) {
1223+
f2fs_info(sbi, "remove qf_name %s",
1224+
old_qname);
1225+
continue;
1226+
} else if (strcmp(old_qname, new_qname) == 0) {
12241227
ctx->qname_mask &= ~(1 << i);
12251228
continue;
12261229
}

0 commit comments

Comments
 (0)