Skip to content

Commit e02ac3e

Browse files
lostjefflehsiangkao
authored andcommitted
erofs: clean up parsing of fscache related options
... to avoid the mess of conditional preprocessing as we are continually adding fscache related mount options. Reviewd-by: Gao Xiang <[email protected]> Reviewed-by: Yue Hu <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jingbo Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
1 parent b22c7b9 commit e02ac3e

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

fs/erofs/super.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,26 +577,25 @@ static int erofs_fc_parse_param(struct fs_context *fc,
577577
}
578578
++ctx->devs->extra_devices;
579579
break;
580-
case Opt_fsid:
581580
#ifdef CONFIG_EROFS_FS_ONDEMAND
581+
case Opt_fsid:
582582
kfree(ctx->fsid);
583583
ctx->fsid = kstrdup(param->string, GFP_KERNEL);
584584
if (!ctx->fsid)
585585
return -ENOMEM;
586-
#else
587-
errorfc(fc, "fsid option not supported");
588-
#endif
589586
break;
590587
case Opt_domain_id:
591-
#ifdef CONFIG_EROFS_FS_ONDEMAND
592588
kfree(ctx->domain_id);
593589
ctx->domain_id = kstrdup(param->string, GFP_KERNEL);
594590
if (!ctx->domain_id)
595591
return -ENOMEM;
592+
break;
596593
#else
597-
errorfc(fc, "domain_id option not supported");
598-
#endif
594+
case Opt_fsid:
595+
case Opt_domain_id:
596+
errorfc(fc, "%s option not supported", erofs_fs_parameters[opt].name);
599597
break;
598+
#endif
600599
default:
601600
return -ENOPARAM;
602601
}

0 commit comments

Comments
 (0)