diff --git a/include/spdk/bdev_module.h b/include/spdk/bdev_module.h index 6d0c2210f..b48979988 100644 --- a/include/spdk/bdev_module.h +++ b/include/spdk/bdev_module.h @@ -951,8 +951,8 @@ void spdk_bdev_module_examine_done(struct spdk_bdev_module *module); /** * Indicate to the bdev layer that the module is done initializing. * - * To be called once during module_init or asynchronously after - * an asynchronous operation required for module initialization is completed. + * To be called once after an asynchronous operation required for module initialization is + * completed. If module->async_init is false, the module must not call this function. * * \param module Pointer to the module completing the initialization. */ diff --git a/lib/bdev/bdev.c b/lib/bdev/bdev.c index 2120fec6f..51c9b6f31 100644 --- a/lib/bdev/bdev.c +++ b/lib/bdev/bdev.c @@ -1583,6 +1583,7 @@ bdev_module_action_done(struct spdk_bdev_module *module) void spdk_bdev_module_init_done(struct spdk_bdev_module *module) { + assert(module->async_init); bdev_module_action_done(module); }