From: Casey Bodley Date: Fri, 4 Mar 2016 20:22:50 +0000 (-0500) Subject: rgw: fix for RGWCoroutinesManager::run() return value X-Git-Tag: v10.1.0~222^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a6771a86484fa55758c6d132caeb7f97b22c822;p=ceph.git rgw: fix for RGWCoroutinesManager::run() return value the 'int ret' variable of the inner scope was shadowing an 'int ret' variable in the outer scope, so we weren't propagating any of the error codes Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index ba36756501c3..cdbc9a5d8376 100644 --- a/src/rgw/rgw_coroutine.cc +++ b/src/rgw/rgw_coroutine.cc @@ -439,7 +439,7 @@ int RGWCoroutinesManager::run(list& stacks) RGWCoroutinesStack *stack = *iter; env.stack = stack; - int ret = stack->operate(&env); + ret = stack->operate(&env); stack->set_is_scheduled(false); if (ret < 0) { ldout(cct, 0) << "ERROR: stack->operate() returned ret=" << ret << dendl; @@ -532,6 +532,9 @@ int RGWCoroutinesManager::run(list& stacks) handle_unblocked_stack(context_stacks, scheduled_stacks, blocked_stack, &blocked_count); iter = scheduled_stacks.begin(); } + if (ret == -ECANCELED) { + break; + } if (iter == scheduled_stacks.end()) { iter = scheduled_stacks.begin();