From d794f7f3728df0845be978a3c9aecead9d48c81d Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 24 Sep 2020 17:26:56 +0200 Subject: nbd: Remove NBDExport.close callback The export close callback is unused by the built-in NBD server. qemu-nbd uses it only during shutdown to wait for the unrefed export to actually go away. It can just use nbd_export_close_all() instead and do without the callback. This removes the close callback from nbd_export_new() and makes both callers of it more similar. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Eric Blake Message-Id: <20200924152717.287415-11-kwolf@redhat.com> Acked-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- include/block/nbd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/block') diff --git a/include/block/nbd.h b/include/block/nbd.h index acccdb3180..9449b3dac4 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -334,8 +334,7 @@ BlockExport *nbd_export_create(BlockExportOptions *exp_args, Error **errp); NBDExport *nbd_export_new(BlockDriverState *bs, const char *name, const char *desc, const char *bitmap, bool readonly, bool shared, - void (*close)(NBDExport *), bool writethrough, - Error **errp); + bool writethrough, Error **errp); void nbd_export_set_on_eject_blk(BlockExport *exp, BlockBackend *blk); void nbd_export_close(NBDExport *exp); void nbd_export_remove(NBDExport *exp, NbdServerRemoveMode mode, Error **errp); -- cgit v1.2.3-55-g7522