]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: shadow variable in snap_unprotect and list_children 3344/head
authorJason Dillaman <dillaman@redhat.com>
Fri, 9 Jan 2015 13:19:43 +0000 (08:19 -0500)
committerJason Dillaman <dillaman@redhat.com>
Fri, 9 Jan 2015 13:28:18 +0000 (08:28 -0500)
The shadow variable prevented snap_unprotect from returning the
correct error return code.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/internal.cc

index 0250e9cbbe762dc11f3c476657e01b952fc4705e..4254470049f018e0660b466a80cfe31af0c210b3 100644 (file)
@@ -419,7 +419,7 @@ namespace librbd {
     for (std::list<std::pair<int64_t, string> >::const_iterator it =
          pools.begin(); it != pools.end(); ++it) {
       int64_t base_tier;
-      int r = rados.pool_get_base_tier(it->first, &base_tier);
+      r = rados.pool_get_base_tier(it->first, &base_tier);
       if (r == -ENOENT) {
         ldout(cct, 1) << "pool " << it->second << " no longer exists" << dendl;
         continue;
@@ -666,7 +666,7 @@ namespace librbd {
     for (std::list<std::pair<int64_t, std::string> >::const_iterator it =
          pools.begin(); it != pools.end(); ++it) {
       int64_t base_tier;
-      int r = rados.pool_get_base_tier(it->first, &base_tier);
+      r = rados.pool_get_base_tier(it->first, &base_tier);
       if (r == -ENOENT) {
         ldout(ictx->cct, 1) << "pool " << it->second << " no longer exists"
                             << dendl;