run() will drop its reference to data_sync_cr, so we need to hold a
reference until we can reacquire the lock
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit
4cf0d2a768e7402e71280ca16b47353ca2a68505)
lock.get_write();
data_sync_cr = new RGWDataSyncControlCR(&sync_env, num_shards);
+ data_sync_cr->get(); // run() will drop a ref, so take another
lock.unlock();
r = run(data_sync_cr);
lock.get_write();
+ data_sync_cr->put();
data_sync_cr = NULL;
lock.unlock();