From: Casey Bodley Date: Fri, 29 Jan 2021 20:31:39 +0000 (-0500) Subject: rgw: fix error handling in drain_with_cb() X-Git-Tag: v17.1.0~3060^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d0916ecbb516363f16a454cfbf0363dec39018ff;p=ceph.git rgw: fix error handling in drain_with_cb() 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 --- diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index e5f9f9927cae..ce08bdd30cb8 100644 --- a/src/rgw/rgw_coroutine.cc +++ b/src/rgw/rgw_coroutine.cc @@ -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 */ } }