commit | 3c005293c2ace58c796b917a792c34c02c4d6433 | [log] [tgz] |
---|---|---|
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | Tue Aug 14 15:43:19 2018 +0300 |
committer | Kevin Wolf <kwolf@redhat.com> | Wed Aug 15 12:50:39 2018 +0200 |
tree | c4227da60141c8cc9fcaf6fe3c809e59f91e0c93 | |
parent | 8d65a3ccfd5db7f0436e095cd952f5d0c3a873ba [diff] [blame] |
block: make .bdrv_close optional Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
diff --git a/block.c b/block.c index 39f373e..9694018 100644 --- a/block.c +++ b/block.c
@@ -3349,7 +3349,9 @@ bdrv_drain(bs); /* in case flush left pending I/O */ if (bs->drv) { - bs->drv->bdrv_close(bs); + if (bs->drv->bdrv_close) { + bs->drv->bdrv_close(bs); + } bs->drv = NULL; }