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>
(cherry picked from commit
5cc599b9bf2dde31de16a5b2831baf06851d69d5)
Conflicts:
src/rgw/rgw_data_sync.cc: declaration of 'int r'
lock.get_write();
data_sync_cr = new RGWDataSyncControlCR(&sync_env, num_shards);
lock.unlock();
+
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;
}