[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 32/36] block: inline bdrv_check_perm_common()
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[PATCH v4 32/36] block: inline bdrv_check_perm_common() |
Date: |
Wed, 28 Apr 2021 18:18:00 +0300 |
bdrv_check_perm_common() has only one caller, so no more sense in
"common".
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
---
block.c | 32 +++-----------------------------
1 file changed, 3 insertions(+), 29 deletions(-)
diff --git a/block.c b/block.c
index bf7c187435..38bd2ea32e 100644
--- a/block.c
+++ b/block.c
@@ -2373,33 +2373,13 @@ static int bdrv_node_check_perm(BlockDriverState *bs,
BlockReopenQueue *q,
return 0;
}
-/*
- * If use_cumulative_perms is true, use cumulative_perms and
- * cumulative_shared_perms for first element of the list. Otherwise just
refresh
- * all permissions.
- */
-static int bdrv_check_perm_common(GSList *list, BlockReopenQueue *q,
- bool use_cumulative_perms,
- uint64_t cumulative_perms,
- uint64_t cumulative_shared_perms,
- Transaction *tran, Error **errp)
+static int bdrv_list_refresh_perms(GSList *list, BlockReopenQueue *q,
+ Transaction *tran, Error **errp)
{
int ret;
+ uint64_t cumulative_perms, cumulative_shared_perms;
BlockDriverState *bs;
- if (use_cumulative_perms) {
- bs = list->data;
-
- ret = bdrv_node_check_perm(bs, q, cumulative_perms,
- cumulative_shared_perms,
- tran, errp);
- if (ret < 0) {
- return ret;
- }
-
- list = list->next;
- }
-
for ( ; list; list = list->next) {
bs = list->data;
@@ -2421,12 +2401,6 @@ static int bdrv_check_perm_common(GSList *list,
BlockReopenQueue *q,
return 0;
}
-static int bdrv_list_refresh_perms(GSList *list, BlockReopenQueue *q,
- Transaction *tran, Error **errp)
-{
- return bdrv_check_perm_common(list, q, false, 0, 0, tran, errp);
-}
-
static void bdrv_node_set_perm(BlockDriverState *bs)
{
BlockDriver *drv = bs->drv;
--
2.29.2
- [PATCH v4 19/36] block: add bdrv_attach_child_noperm() transaction action, (continued)
- [PATCH v4 19/36] block: add bdrv_attach_child_noperm() transaction action, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 11/36] block: rewrite bdrv_child_try_set_perm() using bdrv_refresh_perms(), Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 23/36] block: introduce bdrv_drop_filter(), Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 25/36] block: drop ignore_children for permission update functions, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 31/36] block: drop unused permission update functions, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 27/36] block: make bdrv_refresh_limits() to be a transaction action, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 24/36] block/backup-top: drop .active, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 33/36] block: inline bdrv_replace_child(), Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 30/36] block: bdrv_reopen_multiple: refresh permissions on updated graph, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 26/36] block: make bdrv_unset_inherits_from to be a transaction action, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 32/36] block: inline bdrv_check_perm_common(),
Vladimir Sementsov-Ogievskiy <=
- [PATCH v4 28/36] block: add bdrv_set_backing_noperm() transaction action, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 34/36] block: refactor bdrv_child_set_perm_safe() transaction action, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 29/36] block: bdrv_reopen_multiple(): move bdrv_flush to separate pre-prepare, Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 35/36] block: rename bdrv_replace_child_safe() to bdrv_replace_child(), Vladimir Sementsov-Ogievskiy, 2021/04/28
- [PATCH v4 36/36] block: refactor bdrv_node_check_perm(), Vladimir Sementsov-Ogievskiy, 2021/04/28
- Re: [PATCH v4 00/36] block: update graph permissions update, no-reply, 2021/04/28
- Re: [PATCH v4 00/36] block: update graph permissions update, Kevin Wolf, 2021/04/28