]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix for RGWCoroutinesManager::run() return value 7827/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 4 Mar 2016 20:22:50 +0000 (15:22 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 4 Mar 2016 22:04:09 +0000 (17:04 -0500)
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>
src/rgw/rgw_coroutine.cc

index ba36756501c330f27f10fa5b7cd7d10e534fb368..cdbc9a5d8376e4512ca41359079315e1c52f1a92 100644 (file)
@@ -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;
@@ -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();