On Wed, Apr 05, 2023 at 12:16:34PM +0200, Paolo Bonzini wrote:
> exp->common.blk cannot be NULL, nbd_export_delete() is only called from
> blk_exp_unref() and in turn that can only happen after blk_exp_add()
> has asserted exp->blk != NULL.

Commit message is a bit imprecise (maybe due to refactoring in the
meantime?): drv->delete is only called from blk_exp_delete_bh(), but
that in turn is indeed only called from blk_exp_unref(), so the logic
is sound.

> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  nbd/server.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)

Reviewed-by: Eric Blake <ebl...@redhat.com>

As this is only removal of a useless conditional, it can wait for 8.1.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


Reply via email to