]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix PG leak in SnapTrimWQ._clear() 3819/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:08:43 +0000 (23:08 +0800)
Fixes: #10421
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 01e154d592d6cdbf3f859cf1b4357e803536a6b4)

src/osd/OSD.h

index 426a2b1fab7019e3d91ffc76b5f5b8fd1bb84092..ce6d9e58e438d06871f68ca5036297f4da02302c 100644 (file)
@@ -2079,7 +2079,9 @@ protected:
       pg->put("SnapTrimWQ");
     }
     void _clear() {
-      osd->snap_trim_queue.clear();
+      while (PG *pg = _dequeue()) {
+       pg->put("SnapTrimWQ");
+      }
     }
   } snap_trim_wq;