From e9033bb121dddf2c61a58568946335947b3f2367 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Fri, 9 Jan 2015 08:19:43 -0500 Subject: [PATCH] librbd: shadow variable in snap_unprotect and list_children The shadow variable prevented snap_unprotect from returning the correct error return code. Signed-off-by: Jason Dillaman --- src/librbd/internal.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 0250e9cbbe76..4254470049f0 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -419,7 +419,7 @@ namespace librbd { for (std::list >::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 >::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; -- 2.47.3