[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/11] blockdev: Fix wrong usage of QDECREF causing s
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 09/11] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close. |
Date: |
Fri, 14 Feb 2014 18:29:31 +0100 |
From: BenoƮt Canet <address@hidden>
As bdrv_open() documentation states:
"The reference to the QDict belongs to the block layer
* after the call (even on failure), so if the caller intends to reuse the
* dictionary, it needs to use QINCREF() before calling bdrv_open."
the optional options dict will not be reused after bdrv_open() and should
belong to the block layer so remove the extra QDECREF(options).
Signed-off-by: Benoit Canet <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
blockdev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index d5f21f0..ccd6a72 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1329,8 +1329,6 @@ static void external_snapshot_prepare(BlkTransactionState
*common,
if (ret != 0) {
error_propagate(errp, local_err);
}
-
- QDECREF(options);
}
static void external_snapshot_commit(BlkTransactionState *common)
--
1.8.5.3
- [Qemu-devel] [PULL 00/11] Block patches, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 01/11] sdhci: Drop unnecessary #include, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 03/11] block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 02/11] blockdev: Remove 'type' parameter from blockdev_init(), Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 04/11] block: Don't throw away errno via error_setg, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 05/11] block: qemu-iotests - fix test 070 (vhdx), Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 07/11] qemu-iotests: Don't run 005 on vmdk split formats, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 06/11] block: qemu-iotests - add vhdx log replay tests for qemu-img, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 09/11] blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close.,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 08/11] block: mirror - use local_err to avoid NULL errp, Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 11/11] block: Open by reference will try device then node_name., Stefan Hajnoczi, 2014/02/14
- [Qemu-devel] [PULL 10/11] block: Relax bdrv_lookup_bs constraints., Stefan Hajnoczi, 2014/02/14
- Re: [Qemu-devel] [PULL 00/11] Block patches, Peter Maydell, 2014/02/15