From a06ba543c2916f5205912415d099f155df93b483 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Wed, 2 May 2018 16:41:51 +0800 Subject: [PATCH] osd: fix bug which cause can't erase OSDShardPGSlot. Signed-off-by: Jianpeng Ma --- src/osd/OSD.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1285c22dce15b..e1087d6027038 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9474,14 +9474,15 @@ void OSDShard::consume_map( *pushes_to_free += qi.get_reserved_pushes(); slot->waiting.pop_front(); } - if (slot->waiting.empty() && - slot->num_running == 0 && - !slot->pg) { - dout(20) << __func__ << " " << pgid << " empty, pruning" << dendl; - p = pg_slots.erase(p); - continue; - } } + if (slot->waiting.empty() && + slot->num_running == 0 && + !slot->pg) { + dout(20) << __func__ << " " << pgid << " empty, pruning" << dendl; + p = pg_slots.erase(p); + continue; + } + ++p; } if (queued) { -- 2.39.5