From 7fe265754ca46890a575e577e73409be253f6de1 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 23 Mar 2016 15:24:17 -0700 Subject: [PATCH] rgw: fix lockdep false positive Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_data_sync.cc | 21 ++++++++++----------- src/rgw/rgw_sync.h | 3 ++- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 24756de8fc629..6d73b73549115 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1239,17 +1239,16 @@ public: yield { if ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateSync) { - case rgw_data_sync_info::StateSync: - for (map::iterator iter = sync_status.sync_markers.begin(); - iter != sync_status.sync_markers.end(); ++iter) { - RGWDataSyncShardControlCR *cr = new RGWDataSyncShardControlCR(sync_env, sync_env->store->get_zone_params().log_pool, - iter->first, iter->second); - cr->get(); - shard_crs_lock.Lock(); - shard_crs[iter->first] = cr; - shard_crs_lock.Unlock(); - spawn(cr, true); - } + for (map::iterator iter = sync_status.sync_markers.begin(); + iter != sync_status.sync_markers.end(); ++iter) { + RGWDataSyncShardControlCR *cr = new RGWDataSyncShardControlCR(sync_env, sync_env->store->get_zone_params().log_pool, + iter->first, iter->second); + cr->get(); + shard_crs_lock.Lock(); + shard_crs[iter->first] = cr; + shard_crs_lock.Unlock(); + spawn(cr, true); + } } } diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h index 679f91c6dbb27..dcb3a4ee329f4 100644 --- a/src/rgw/rgw_sync.h +++ b/src/rgw/rgw_sync.h @@ -5,6 +5,7 @@ #include "rgw_http_client.h" #include "rgw_meta_sync_status.h" +#include "include/stringify.h" #include "common/RWLock.h" #define ERROR_LOGGER_SHARDS 32 @@ -142,7 +143,7 @@ protected: } public: - RGWBackoffControlCR(CephContext *_cct, bool _exit_on_error) : RGWCoroutine(_cct), cr(NULL), lock("RGWBackoffControlCR::lock"), + RGWBackoffControlCR(CephContext *_cct, bool _exit_on_error) : RGWCoroutine(_cct), cr(NULL), lock("RGWBackoffControlCR::lock:" + stringify(this)), reset_backoff(false), exit_on_error(_exit_on_error) { } -- 2.39.5