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>
This commit is contained in:
parent
058acc4708
commit
25409807cf
32
block.c
32
block.c
@ -2373,33 +2373,13 @@ static int bdrv_node_check_perm(BlockDriverState *bs, BlockReopenQueue *q,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
static int bdrv_list_refresh_perms(GSList *list, BlockReopenQueue *q,
|
||||||
* If use_cumulative_perms is true, use cumulative_perms and
|
Transaction *tran, Error **errp)
|
||||||
* 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)
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
uint64_t cumulative_perms, cumulative_shared_perms;
|
||||||
BlockDriverState *bs;
|
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) {
|
for ( ; list; list = list->next) {
|
||||||
bs = list->data;
|
bs = list->data;
|
||||||
|
|
||||||
@ -2421,12 +2401,6 @@ static int bdrv_check_perm_common(GSList *list, BlockReopenQueue *q,
|
|||||||
return 0;
|
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)
|
static void bdrv_node_set_perm(BlockDriverState *bs)
|
||||||
{
|
{
|
||||||
BlockDriver *drv = bs->drv;
|
BlockDriver *drv = bs->drv;
|
||||||
|
Loading…
Reference in New Issue
Block a user