From a2f63f46812c70540cbb757777828b68095238fc Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Wed, 7 Aug 2019 10:10:42 +0800 Subject: [PATCH] os/bluestore: No need check !q.emtpy(). when call drain_preceding, this TransContext already added into q. Signed-off-by: Jianpeng Ma --- src/os/bluestore/BlueStore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index d7bd4af5544..268d5389a4a 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -1637,7 +1637,7 @@ public: void drain_preceding(TransContext *txc) { std::unique_lock l(qlock); - while (!q.empty() && &q.front() != txc) + while (&q.front() != txc) qcond.wait(l); } -- 2.39.5