Repository: cloudstack Updated Branches: refs/heads/4.4 92339bca0 -> e454acc2c
CLOUDSTACK-6236:fix a copy-and-paste error for decrRefCnt in VolumeDataStoreVO. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e454acc2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e454acc2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e454acc2 Branch: refs/heads/4.4 Commit: e454acc2c02a549dd5e05091aa11cca14cbf6c7e Parents: 92339bc Author: Min Chen <min.c...@citrix.com> Authored: Wed Sep 3 21:36:48 2014 -0700 Committer: Min Chen <min.c...@citrix.com> Committed: Wed Sep 3 21:36:48 2014 -0700 ---------------------------------------------------------------------- .../storage/datastore/db/VolumeDataStoreVO.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e454acc2/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java ---------------------------------------------------------------------- diff --git a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java index aa57e74..91d4ef7 100755 --- a/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java +++ b/engine/schema/src/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java @@ -350,12 +350,7 @@ public class VolumeDataStoreVO implements StateObject<ObjectInDataStoreStateMach } public void setRefCnt(Long refCnt) { - if (refCnt > 0) { - refCnt--; - } - else { - s_logger.warn("We should not try to decrement a zero reference count even though our code has guarded"); - } + this.refCnt = refCnt; } public void incrRefCnt() { @@ -363,7 +358,12 @@ public class VolumeDataStoreVO implements StateObject<ObjectInDataStoreStateMach } public void decrRefCnt() { - refCnt--; + if (refCnt > 0) { + refCnt--; + } + else { + s_logger.warn("We should not try to decrement a zero reference count even though our code has guarded"); + } } public String getExtractUrl() {