From: Igor Fedotov Date: Mon, 5 Aug 2019 14:22:43 +0000 (+0300) Subject: common/Finisher: rename ContextQueue::swap method. X-Git-Tag: v15.1.0~1919^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0d86bedd15bdd82d83b06c6a49657176322a9ef4;p=ceph.git common/Finisher: rename ContextQueue::swap method. Actually it doesn't conform to swap semantic. Signed-off-by: Igor Fedotov --- diff --git a/src/common/Finisher.h b/src/common/Finisher.h index 6926d8207b41e..d76674027c7a6 100644 --- a/src/common/Finisher.h +++ b/src/common/Finisher.h @@ -220,7 +220,7 @@ public: ls.clear(); } - void swap(std::list& ls) { + void move_to(std::list& ls) { ls.clear(); std::scoped_lock l(q_mutex); if (!q.empty()) { diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index d67002909e9ef..052768b672f6b 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -10494,7 +10494,7 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb) list oncommits; if (is_smallest_thread_index && !sdata->context_queue.empty()) { - sdata->context_queue.swap(oncommits); + sdata->context_queue.move_to(oncommits); } if (sdata->pqueue->empty()) {