You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2014/11/26 14:21:23 UTC

[3/8] git commit: updated refs/heads/4.3 to 2b264e6

CLOUDSTACK-6236:fix a copy-and-paste error for decrRefCnt in
VolumeDataStoreVO.
(cherry picked from commit 672bb353be2f159966f351ab2de914b433a934f9)

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2534b548
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2534b548
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2534b548

Branch: refs/heads/4.3
Commit: 2534b54853d81d41e364348e0cc0cecb3c950294
Parents: 88ec084
Author: Min Chen <mi...@citrix.com>
Authored: Wed Sep 3 10:33:11 2014 -0700
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Nov 26 18:15:05 2014 +0530

----------------------------------------------------------------------
 .../storage/datastore/db/VolumeDataStoreVO.java       | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2534b548/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 bd15f1c..f5589da 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
@@ -348,12 +348,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() {
@@ -361,7 +356,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() {