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 aa57e742148..91d4ef71cfa 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 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 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() {