]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: do not check ContextQueue for empty before taking the content.
authorIgor Fedotov <ifedotov@suse.com>
Mon, 5 Aug 2019 14:25:25 +0000 (17:25 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 5 Aug 2019 14:25:25 +0000 (17:25 +0300)
This saves one lock acquisition. And empty() call is useless as move_to
checks for emptyness anyway()

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/osd/OSD.cc

index 052768b672f6ba8d82b061224e30521aeb001992..5988c2826060f2e24aa07e702cb55030966064ed 100644 (file)
@@ -10493,7 +10493,7 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb)
   }
 
   list<Context *> oncommits;
-  if (is_smallest_thread_index && !sdata->context_queue.empty()) {
+  if (is_smallest_thread_index) {
     sdata->context_queue.move_to(oncommits);
   }