diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-04-28 18:18:00 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-04-30 12:27:48 +0200 |
commit | 25409807cfe3a961c8898b23de9eec61b068c6f8 (patch) | |
tree | f79ec7440d82065bb11775bd29930e902e124662 /block.c | |
parent | 058acc470825e2df2b971877e1f030a8ac80713f (diff) |
block: inline bdrv_check_perm_common()
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>
Message-Id: <20210428151804.439460-33-vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 32 |
1 files changed, 3 insertions, 29 deletions
@@ -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; |