Revert "btrfs: only chown_mapped_root() if not btrfs"

This reverts commit d848b631. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent d27bcc36
...@@ -412,17 +412,12 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname, ...@@ -412,17 +412,12 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
goto err; goto err;
} }
/* If the storage driver is "btrfs" then the we will create snapshot. */ if (!strcmp(new->type, "overlay") || !strcmp(new->type, "overlayfs"))
if (strcmp(bdevtype, "btrfs")) { src_no_prefix = ovl_get_lower(new->src);
if (!strcmp(new->type, "overlay") || else
!strcmp(new->type, "overlayfs")) src_no_prefix = lxc_storage_get_path(new->src, new->type);
src_no_prefix = ovl_get_lower(new->src); if (am_unpriv() && chown_mapped_root(src_no_prefix, c0->lxc_conf) < 0)
else WARN("Failed to update ownership of %s", new->dest);
src_no_prefix = lxc_storage_get_path(new->src, new->type);
if (am_unpriv() && chown_mapped_root(src_no_prefix, c0->lxc_conf) < 0)
WARN("Failed to chown \"%s\"", src_no_prefix);
}
if (snap) if (snap)
return new; return new;
......
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