> /* blkdev->bs is not create by us, we get a reference > * so we can bdrv_unref() unconditionally */ > - bdrv_ref(blkdev->bs);
> + /* Except we don't bdrv_unref() anymore, we blk_unref(). Is this dot extra ? ^ The following line seems to make better sense without this dot and the initial cap. > + * Conditionally, because we can't easily blk_ref() here. > @@ -712,9 +711,7 @@ static int img_check(int argc, char **argv) > > fail: > qapi_free_ImageCheck(check); > - bdrv_unref(bs); > blk_unref(blk); > - Spurious blank line removal here. > @@ -483,9 +481,6 @@ int main(int argc, char **argv) > */ > bdrv_drain_all(); > > - if (qemuio_bs) { > - bdrv_unref(qemuio_bs); > - } > blk_unref(qemuio_blk); > g_free(readline_state); > return 0; > diff --git a/qemu-nbd.c b/qemu-nbd.c > index fa8a7d0..0c496af 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -771,7 +771,6 @@ int main(int argc, char **argv) Well that does seems to simplify things a lot.