From: Jianpeng Ma Date: Wed, 2 May 2018 08:41:51 +0000 (+0800) Subject: osd: fix bug which cause can't erase OSDShardPGSlot. X-Git-Tag: v13.1.1~56^2~5^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21771%2Fhead;p=ceph.git osd: fix bug which cause can't erase OSDShardPGSlot. Signed-off-by: Jianpeng Ma --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1285c22dce15..e1087d602703 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) {