Commit e02ac3e7 authored by Jingbo Xu's avatar Jingbo Xu Committed by Gao Xiang

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: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: default avatarYue Hu <huyue2@coolpad.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230112065431.124926-3-jefflexu@linux.alibaba.comSigned-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
parent b22c7b97
...@@ -577,26 +577,25 @@ static int erofs_fc_parse_param(struct fs_context *fc, ...@@ -577,26 +577,25 @@ static int erofs_fc_parse_param(struct fs_context *fc,
} }
++ctx->devs->extra_devices; ++ctx->devs->extra_devices;
break; break;
case Opt_fsid:
#ifdef CONFIG_EROFS_FS_ONDEMAND #ifdef CONFIG_EROFS_FS_ONDEMAND
case Opt_fsid:
kfree(ctx->fsid); kfree(ctx->fsid);
ctx->fsid = kstrdup(param->string, GFP_KERNEL); ctx->fsid = kstrdup(param->string, GFP_KERNEL);
if (!ctx->fsid) if (!ctx->fsid)
return -ENOMEM; return -ENOMEM;
#else
errorfc(fc, "fsid option not supported");
#endif
break; break;
case Opt_domain_id: case Opt_domain_id:
#ifdef CONFIG_EROFS_FS_ONDEMAND
kfree(ctx->domain_id); kfree(ctx->domain_id);
ctx->domain_id = kstrdup(param->string, GFP_KERNEL); ctx->domain_id = kstrdup(param->string, GFP_KERNEL);
if (!ctx->domain_id) if (!ctx->domain_id)
return -ENOMEM; return -ENOMEM;
break;
#else #else
errorfc(fc, "domain_id option not supported"); case Opt_fsid:
#endif case Opt_domain_id:
errorfc(fc, "%s option not supported", erofs_fs_parameters[opt].name);
break; break;
#endif
default: default:
return -ENOPARAM; return -ENOPARAM;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment