]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix error handling in drain_with_cb()
authorCasey Bodley <cbodley@redhat.com>
Fri, 29 Jan 2021 20:31:39 +0000 (15:31 -0500)
committerCasey Bodley <cbodley@redhat.com>
Fri, 29 Jan 2021 22:29:13 +0000 (17:29 -0500)
when the drain_children() callback function returns an error, set the
should_exit flag so that the drain_with_cb() macro can return that
error code via set_cr_error()

Fixes: https://tracker.ceph.com/issues/49065
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_coroutine.cc

index e5f9f9927cae594c1a9b212ddd4a3ef26d14d383..ce08bdd30cb8505bbdf04718e7bfcdb295ef5976 100644 (file)
@@ -1010,6 +1010,7 @@ bool RGWCoroutine::drain_children(int num_cr_left,
           int r = (*cb)(stack_id, ret);
           if (r < 0) {
             drain_status.ret = r;
+            drain_status.should_exit = true;
             num_cr_left = 0; /* need to drain all */
           }
         }