Commit a3a683c3 authored by Kevin Wolf's avatar Kevin Wolf
Browse files

block: Make bdrv_attach/detach_aio_context() static



Since commit b97511c7, there is no reason for block drivers any more
to call these functions (see the function comment in block_int.h). They
are now just internal helper functions for bdrv_set_aio_context()
and can be made static.

Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 5d231849
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -5676,7 +5676,7 @@ static void bdrv_do_remove_aio_context_notifier(BdrvAioNotifier *ban)
    g_free(ban);
}

void bdrv_detach_aio_context(BlockDriverState *bs)
static void bdrv_detach_aio_context(BlockDriverState *bs)
{
    BdrvAioNotifier *baf, *baf_tmp;
    BdrvChild *child;
@@ -5708,7 +5708,7 @@ void bdrv_detach_aio_context(BlockDriverState *bs)
    bs->aio_context = NULL;
}

void bdrv_attach_aio_context(BlockDriverState *bs,
static void bdrv_attach_aio_context(BlockDriverState *bs,
                                    AioContext *new_context)
{
    BdrvAioNotifier *ban, *ban_tmp;
+0 −21
Original line number Diff line number Diff line
@@ -965,27 +965,6 @@ void bdrv_parse_filename_strip_prefix(const char *filename, const char *prefix,
void bdrv_add_before_write_notifier(BlockDriverState *bs,
                                    NotifierWithReturn *notifier);

/**
 * bdrv_detach_aio_context:
 *
 * May be called from .bdrv_detach_aio_context() to detach children from the
 * current #AioContext.  This is only needed by block drivers that manage their
 * own children.  Both ->file and ->backing are automatically handled and
 * block drivers should not call this function on them explicitly.
 */
void bdrv_detach_aio_context(BlockDriverState *bs);

/**
 * bdrv_attach_aio_context:
 *
 * May be called from .bdrv_attach_aio_context() to attach children to the new
 * #AioContext.  This is only needed by block drivers that manage their own
 * children.  Both ->file and ->backing are automatically handled and block
 * drivers should not call this function on them explicitly.
 */
void bdrv_attach_aio_context(BlockDriverState *bs,
                             AioContext *new_context);

/**
 * bdrv_add_aio_context_notifier:
 *