diff mbox series

[v2,1/7] block: add forgotten bdrv_abort_perm_update() to bdrv_co_invalidate_cache()

Message ID 20201106124241.16950-2-vsementsov@virtuozzo.com
State Accepted
Commit 6c5f7b3a1002ebe552782de4f3664a486d444323
Headers show
Series block: permission update fix & refactor | expand

Commit Message

Vladimir Sementsov-Ogievskiy Nov. 6, 2020, 12:42 p.m. UTC
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 block.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alberto Garcia Nov. 6, 2020, 12:47 p.m. UTC | #1
On Fri 06 Nov 2020 01:42:35 PM CET, Vladimir Sementsov-Ogievskiy wrote:
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>


Reviewed-by: Alberto Garcia <berto@igalia.com>


Berto
diff mbox series

Patch

diff --git a/block.c b/block.c
index 56bacc9e9f..19db7b7aeb 100644
--- a/block.c
+++ b/block.c
@@ -5782,6 +5782,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;
         }