async notifications will still try to call wakeup() on RGWDataSyncControlCR
if it fails, leading to segfault
Fixes: http://tracker.ceph.com/issues/17569
Signed-off-by: Casey Bodley <cbodley@redhat.com>
lock.get_write();
data_sync_cr = new RGWDataSyncControlCR(&sync_env, num_shards);
lock.unlock();
+
int r = run(data_sync_cr);
- if (r < 0) {
- ldout(store->ctx(), 0) << "ERROR: failed to run sync" << dendl;
- return r;
- }
lock.get_write();
data_sync_cr = NULL;
lock.unlock();
+ if (r < 0) {
+ ldout(store->ctx(), 0) << "ERROR: failed to run sync" << dendl;
+ return r;
+ }
return 0;
}