Skip to content

Commit 7eff345

Browse files
committed
ovl: pass string to ovl_parse_layer()
So it can be used for parsing the Opt_lowerdir. Signed-off-by: Zhihao Cheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent e2e89f9 commit 7eff345

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/overlayfs/params.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,9 @@ static void ovl_add_layer(struct fs_context *fc, enum ovl_opt layer,
365365
}
366366
}
367367

368-
static int ovl_parse_layer(struct fs_context *fc, struct fs_parameter *param,
369-
enum ovl_opt layer)
368+
static int ovl_parse_layer(struct fs_context *fc, const char *layer_name, enum ovl_opt layer)
370369
{
371-
char *name = kstrdup(param->string, GFP_KERNEL);
370+
char *name = kstrdup(layer_name, GFP_KERNEL);
372371
bool upper = (layer == Opt_upperdir || layer == Opt_workdir);
373372
struct path path;
374373
int err;
@@ -582,7 +581,7 @@ static int ovl_parse_param(struct fs_context *fc, struct fs_parameter *param)
582581
case Opt_datadir_add:
583582
case Opt_upperdir:
584583
case Opt_workdir:
585-
err = ovl_parse_layer(fc, param, opt);
584+
err = ovl_parse_layer(fc, param->string, opt);
586585
break;
587586
case Opt_default_permissions:
588587
config->default_permissions = true;

0 commit comments

Comments
 (0)