Message ID | b3ac14007e00bb926099f631e10680781d6508b7.1556540297.git.berto@igalia.com |
---|---|
State | New |
Headers | show |
Series | commit: Make base read-only if there is an early failure | expand |
diff --git a/block/commit.c b/block/commit.c index ba60fef58a..698eda1dfe 100644 --- a/block/commit.c +++ b/block/commit.c @@ -384,6 +384,9 @@ fail: if (s->top) { blk_unref(s->top); } + if (s->base_read_only) { + bdrv_reopen_set_read_only(base, true, NULL); + } job_early_fail(&s->common.job); /* commit_top_bs has to be replaced after deleting the block job, * otherwise this would fail because of lack of permissions. */