Commit 7eff3453 authored by Christian Brauner's avatar Christian Brauner

ovl: pass string to ovl_parse_layer()

So it can be used for parsing the Opt_lowerdir.
Signed-off-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
Link: https://lore.kernel.org/r/20240705011510.794025-2-chengzhihao1@huawei.comSigned-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent e2e89f96
......@@ -365,10 +365,9 @@ static void ovl_add_layer(struct fs_context *fc, enum ovl_opt layer,
}
}
static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param,
enum ovl_opt layer)
static int ovl_parse_layer(struct fs_context *fc, const char *layer_name, enum ovl_opt layer)
{
char *name = kstrdup(param->string, GFP_KERNEL);
char *name = kstrdup(layer_name, GFP_KERNEL);
bool upper = (layer == Opt_upperdir || layer == Opt_workdir);
struct path path;
int err;
......@@ -582,7 +581,7 @@ static int ovl_parse_param(struct fs_context *fc, struct fs_parameter *param)
case Opt_datadir_add:
case Opt_upperdir:
case Opt_workdir:
err = ovl_parse_layer(fc, param, opt);
err = ovl_parse_layer(fc, param->string, opt);
break;
case Opt_default_permissions:
config->default_permissions = true;
......
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