aboutsummaryrefslogtreecommitdiff
path: root/nbd
diff options
context:
space:
mode:
Diffstat (limited to 'nbd')
-rw-r--r--nbd/server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nbd/server.c b/nbd/server.c
index c5d71cff10..982de67816 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1567,13 +1567,13 @@ NBDExport *nbd_export_new(BlockDriverState *bs, uint64_t dev_offset,
if (bitmap) {
BdrvDirtyBitmap *bm = NULL;
- while (true) {
+ while (bs) {
bm = bdrv_find_dirty_bitmap(bs, bitmap);
- if (bm != NULL || bs->backing == NULL) {
+ if (bm != NULL) {
break;
}
- bs = bs->backing->bs;
+ bs = bdrv_filter_or_cow_bs(bs);
}
if (bm == NULL) {