]> www.infradead.org Git - users/dwmw2/qemu.git/commit
block/nbd: extract the common cleanup code
authorPan Nengyuan <pannengyuan@huawei.com>
Thu, 5 Dec 2019 03:45:27 +0000 (11:45 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 11 May 2020 19:39:09 +0000 (14:39 -0500)
commit85df33073ae957ebe744d1f6eeabc7fe6151c301
tree50fdb31d4c0cecedb307e5929ed86c2a47066b16
parentb0ca999a43a22b38158a222233d3f5881648bb4f
block/nbd: extract the common cleanup code

The BDRVNBDState cleanup code is common in two places, add
nbd_clear_bdrvstate() function to do these cleanups.

Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <1575517528-44312-2-git-send-email-pannengyuan@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[eblake: fix compilation error and commit message]
Signed-off-by: Eric Blake <eblake@redhat.com>
(cherry picked from commit 7f493662be4045146a8f45119d8834c9088a0ad6)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/nbd.c