aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2020-11-06 15:42:35 +0300
committerMax Reitz <mreitz@redhat.com>2020-11-09 18:43:31 +0100
commit6c5f7b3a1002ebe552782de4f3664a486d444323 (patch)
tree3cbb1ec56788989b8d9b19b1ab43908dc553ed41 /block.c
parent5f14f31d2bbb2c00b59c7e9cbbd584d0cee80273 (diff)
block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache()
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20201106124241.16950-2-vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block.c b/block.c
index 2fd932154e..1e68bd2f5f 100644
--- a/block.c
+++ b/block.c
@@ -5787,6 +5787,7 @@ int coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs, Error **errp)
bdrv_get_cumulative_perm(bs, &perm, &shared_perm);
ret = bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, NULL, errp);
if (ret < 0) {
+ bdrv_abort_perm_update(bs);
bs->open_flags |= BDRV_O_INACTIVE;
return ret;
}