mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
ovl: pass string to ovl_parse_layer()
So it can be used for parsing the Opt_lowerdir. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Link: https://lore.kernel.org/r/20240705011510.794025-2-chengzhihao1@huawei.com Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
e2e89f9630
commit
7eff3453cb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user