Unverified Commit eba282e4 by Christian Brauner Committed by GitHub

Merge pull request #2859 from stgraber/master

mount: Allow over-mounting
parents 4d3d037a c00d0e3b
......@@ -5071,10 +5071,12 @@ static int do_lxcapi_mount(struct lxc_container *c, const char *source,
_exit(EXIT_FAILURE);
}
ret = create_mount_target(target, sb.st_mode);
if (ret < 0)
_exit(EXIT_FAILURE);
TRACE("Created mount target \"%s\"", target);
if (access(target, F_OK) < 0 && errno == ENOENT) {
ret = create_mount_target(target, sb.st_mode);
if (ret < 0)
_exit(EXIT_FAILURE);
TRACE("Created mount target \"%s\"", target);
}
suff = strrchr(template, '/');
if (!suff)
......
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