From d0916ecbb516363f16a454cfbf0363dec39018ff Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 29 Jan 2021 15:31:39 -0500 Subject: [PATCH] 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 --- src/rgw/rgw_coroutine.cc | 1 + 1 file changed, 1 insertion(+) 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 */ } } -- 2.47.3