Skip to content

Commit

Permalink
rgw: fix for RGWCoroutinesManager::run() return value
Browse files Browse the repository at this point in the history
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 <cbodley@redhat.com>
  • Loading branch information
cbodley committed Mar 4, 2016
1 parent 5434db9 commit 9a6771a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rgw/rgw_coroutine.cc
Expand Up @@ -439,7 +439,7 @@ int RGWCoroutinesManager::run(list<RGWCoroutinesStack *>& 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;
Expand Down Expand Up @@ -532,6 +532,9 @@ int RGWCoroutinesManager::run(list<RGWCoroutinesStack *>& 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();
Expand Down

0 comments on commit 9a6771a

Please sign in to comment.