From: Yehuda Sadeh Date: Mon, 15 Feb 2016 22:50:48 +0000 (-0800) Subject: rgw: adjust data sync async notification locking X-Git-Tag: v10.1.0~354^2~36 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=842140b3e83098bb7ef193d946c4c68309d397ab;p=ceph.git rgw: adjust data sync async notification locking This is a workaround to avoid issues related to the way lockdep works Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index abd1a770cadc..c822d2d39958 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1138,12 +1138,23 @@ public: } void wakeup(int shard_id, set& keys) { - Mutex::Locker l(cr_lock()); + Mutex& m = cr_lock(); + m.Lock(); RGWDataSyncCR *cr = static_cast(get_cr()); + if (!cr) { + m.Unlock(); + return; + } + + cr->get(); + m.Unlock(); + if (cr) { cr->wakeup(shard_id, keys); } + + cr->put(); } };