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:
Paolo Bonzini
2012-09-19 15:26:15 +02:00
parent 9a304d29a7
commit a4aab7b4cb
2 changed files with 1 additions and 1 deletions
-1
View File
@@ -721,7 +721,6 @@ void nbd_export_close(NBDExport *exp)
g_free(first);
}
bdrv_close(exp->bs);
g_free(exp);
}
+1
View File
@@ -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);
}