diff options
author | Casey Bodley <cbodley@redhat.com> | 2021-01-29 21:31:39 +0100 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2021-01-29 23:29:13 +0100 |
commit | d0916ecbb516363f16a454cfbf0363dec39018ff (patch) | |
tree | 2b61daff8e38f01c08675fc9d4ee844a279b3015 /src/rgw/rgw_coroutine.cc | |
parent | rgw: removed unused RunBucketSourcesSync::ret (diff) | |
download | ceph-d0916ecbb516363f16a454cfbf0363dec39018ff.tar.xz ceph-d0916ecbb516363f16a454cfbf0363dec39018ff.zip |
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 <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_coroutine.cc')
-rw-r--r-- | src/rgw/rgw_coroutine.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index e5f9f9927ca..ce08bdd30cb 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 */ } } |