nbd: do not close BlockDriverState in nbd_export_close
This is not desirable when embedding the NBD server inside QEMU. Move the bdrv_close to qemu-nbd. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
9a304d29a7
commit
a4aab7b4cb
1
nbd.c
1
nbd.c
@ -721,7 +721,6 @@ void nbd_export_close(NBDExport *exp)
|
||||
g_free(first);
|
||||
}
|
||||
|
||||
bdrv_close(exp->bs);
|
||||
g_free(exp);
|
||||
}
|
||||
|
||||
|
@ -586,6 +586,7 @@ int main(int argc, char **argv)
|
||||
} while (!sigterm_reported && (persistent || !nbd_started || nb_fds > 0));
|
||||
|
||||
nbd_export_close(exp);
|
||||
bdrv_close(bs);
|
||||
if (sockpath) {
|
||||
unlink(sockpath);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user