rgw/multisite: Fix use-after-move in retry logic in logbacking
Fitting a retry loop around a call that took the lock changed the
logic to potentially have the lock be used after moving.
Thanks to Suyash Dongre suyashd999@gmail.com for finding it.
This patch also fixes a lock being held across an I/O operation.
Fixes: https://tracker.ceph.com/issues/66340
Signed-off-by: Adam Emerson <aemerson@redhat.com>
(cherry picked from commit
80cf2ca3b44246ad8f2e333182b3c8b1835a71f7)
Fixed: https://tracker.ceph.com/issues/68053
Signed-off-by: Adam Emerson <aemerson@redhat.com>