void nbd_export_close(NBDExport *exp)

{

    NBDClient *client, *next;



    nbd_export_get(exp);

    QTAILQ_FOREACH_SAFE(client, &exp->clients, next, next) {

        nbd_client_close(client);

    }

    nbd_export_set_name(exp, NULL);

    nbd_export_put(exp);

    if (exp->blk) {

        blk_remove_aio_context_notifier(exp->blk, blk_aio_attached,

                                        blk_aio_detach, exp);

        blk_unref(exp->blk);

        exp->blk = NULL;

    }

}

void nbd_export_close(NBDExport *exp)

{

    NBDClient *client, *next;



    nbd_export_get(exp);

    QTAILQ_FOREACH_SAFE(client, &exp->clients, next, next) {

        nbd_client_close(client);

    }

    nbd_export_set_name(exp, NULL);

    nbd_export_put(exp);

    if (exp->blk) {

        blk_remove_aio_context_notifier(exp->blk, blk_aio_attached,

                                        blk_aio_detach, exp);

        blk_unref(exp->blk);

        exp->blk = NULL;

    }

}

void FUNC_0(NBDExport *VAR_0)

{

    NBDClient *client, *next;



    nbd_export_get(VAR_0);

    QTAILQ_FOREACH_SAFE(client, &VAR_0->clients, next, next) {

        nbd_client_close(client);

    }

    nbd_export_set_name(VAR_0, NULL);

    nbd_export_put(VAR_0);

    if (VAR_0->blk) {

        blk_remove_aio_context_notifier(VAR_0->blk, blk_aio_attached,

                                        blk_aio_detach, VAR_0);

        blk_unref(VAR_0->blk);

        VAR_0->blk = NULL;

    }

}

void FUNC_0(NBDExport *VAR_0)
{ NBDClient *client, *next; nbd_export_get(VAR_0); QTAILQ_FOREACH_SAFE(client, &VAR_0->clients, next, next) { nbd_client_close(client); } nbd_export_set_name(VAR_0, NULL); nbd_export_put(VAR_0); if (VAR_0->blk) { blk_remove_aio_context_notifier(VAR_0->blk, blk_aio_attached,
blk_aio_detach, VAR_0); blk_unref(VAR_0->blk); VAR_0->blk = NULL; } }