On 30.03.22 23:28, Vladimir Sementsov-Ogievskiy wrote:
Now the function can remove any child, so give it more common name.
Drop assertions and drop bs argument which becomes unused. Function
would be reused in a further commit.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsement...@openvz.org>
---
  block.c | 22 ++++++++--------------
  1 file changed, 8 insertions(+), 14 deletions(-)

Good!

diff --git a/block.c b/block.c
index 6b43e101a1..ea5687edc8 100644
--- a/block.c
+++ b/block.c

[...]

-static TransactionActionDrv bdrv_remove_filter_or_cow_child_drv = {
-    .commit = bdrv_remove_filter_or_cow_child_commit,
+static TransactionActionDrv bdrv_remove_child_drv = {
+    .commit = bdrv_remove_child_commit,
  };
/*
   * A function to remove backing or file child of @bs.

I think it’d make sense to update this description here.

   * Function doesn't update permissions, caller is responsible for this.
   */
-static void bdrv_remove_file_or_backing_child(BlockDriverState *bs,
-                                              BdrvChild *child,
-                                              Transaction *tran)
+static void bdrv_remove_child(BdrvChild *child, Transaction *tran)
  {
-    assert(child == bs->backing || child == bs->file);
-
      if (!child) {
          return;
      }


Reply via email to