]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix PG leak in SnapTrimWQ._clear() 3820/head
authorKefu Chai <kchai@redhat.com>
Tue, 10 Feb 2015 08:29:45 +0000 (16:29 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 27 Feb 2015 15:10:23 +0000 (23:10 +0800)
Fixes: #10421
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 01e154d592d6cdbf3f859cf1b4357e803536a6b4)

src/osd/OSD.h

index 9d03e4dc06fc73c1959761568bccf8bff4f320c2..dea216d06c975d72904f182bd0eb1959b35d1452 100644 (file)
@@ -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;