diff mbox series

[v2,35/36] block: rename bdrv_replace_child_safe() to bdrv_replace_child()

Message ID 20201127144522.29991-36-vsementsov@virtuozzo.com (mailing list archive)
State New, archived
Headers show
Series block: update graph permissions update | expand

Commit Message

Vladimir Sementsov-Ogievskiy Nov. 27, 2020, 2:45 p.m. UTC
We don't have bdrv_replace_child(), so it's time for
bdrv_replace_child_safe() to take its place.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 block.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/block.c b/block.c
index 1fde22e4f4..20b1cf59f7 100644
--- a/block.c
+++ b/block.c
@@ -2183,11 +2183,11 @@  static TransactionActionDrv bdrv_replace_child_drv = {
 };
 
 /*
- * bdrv_replace_child_safe
+ * bdrv_replace_child
  *
  * Note: real unref of old_bs is done only on commit.
  */
-static void bdrv_replace_child_safe(BdrvChild *child, BlockDriverState *new_bs,
+static void bdrv_replace_child(BdrvChild *child, BlockDriverState *new_bs,
                                     GSList **tran)
 {
     BdrvReplaceChildState *s = g_new(BdrvReplaceChildState, 1);
@@ -3040,7 +3040,7 @@  static int bdrv_set_backing_noperm(BlockDriverState *bs,
     }
 
     if (bs->backing && backing_bs) {
-        bdrv_replace_child_safe(bs->backing, backing_bs, tran);
+        bdrv_replace_child(bs->backing, backing_bs, tran);
     } else if (bs->backing && !backing_bs) {
         bdrv_remove_backing(bs, tran);
     } else if (backing_bs) {
@@ -4679,7 +4679,7 @@  static void bdrv_remove_backing(BlockDriverState *bs, GSList **tran)
     }
 
     if (bs->backing->bs) {
-        bdrv_replace_child_safe(bs->backing, NULL, tran);
+        bdrv_replace_child(bs->backing, NULL, tran);
     }
 
     tran_prepend(tran, &bdrv_remove_backing_drv, bs->backing);
@@ -4708,7 +4708,7 @@  static int bdrv_replace_node_noperm(BlockDriverState *from,
                        c->name, from->node_name);
             return -EPERM;
         }
-        bdrv_replace_child_safe(c, to, tran);
+        bdrv_replace_child(c, to, tran);
     }
 
     return 0;