From: Kefu Chai Date: Tue, 10 Feb 2015 08:29:45 +0000 (+0800) Subject: osd: fix PG leak in SnapTrimWQ._clear() X-Git-Tag: v0.80.9~4^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3820%2Fhead;p=ceph.git osd: fix PG leak in SnapTrimWQ._clear() Fixes: #10421 Signed-off-by: Kefu Chai (cherry picked from commit 01e154d592d6cdbf3f859cf1b4357e803536a6b4) --- diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 9d03e4dc06fc..dea216d06c97 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1740,7 +1740,9 @@ protected: pg->put("SnapTrimWQ"); } void _clear() { - osd->snap_trim_queue.clear(); + while (PG *pg = _dequeue()) { + pg->put("SnapTrimWQ"); + } } } snap_trim_wq;