common/perf_counters: extract m_name(name_c_str()) out
authorKefu Chai <kchai@redhat.com>
Mon, 19 Nov 2018 04:06:53 +0000 (12:06 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 21 Nov 2018 08:13:30 +0000 (16:13 +0800)
it was wrongly duplicated in 8bf92fb6

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/perf_counters.cc

index 7d64450546a109afd315355d69c93f21c8158b2e..0c57c02482b4de2f9dafd1c08475ec967ca5cc27 100644 (file)
@@ -473,12 +473,11 @@ PerfCounters::PerfCounters(CephContext *cct, const std::string &name,
   : m_cct(cct),
     m_lower_bound(lower_bound),
     m_upper_bound(upper_bound),
+    m_name(name)
 #ifndef WITH_SEASTAR
-    m_name(name.c_str()),
+    ,
     m_lock_name(std::string("PerfCounters::") + name.c_str()),
     m_lock(ceph::make_mutex(m_lock_name))
-#else
-    m_name(name.c_str())
 #endif
 {
   m_data.resize(upper_bound - lower_bound - 1);