]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix PG leak in SnapTrimWQ._clear() 3678/head
authorKefu Chai <kchai@redhat.com>
Tue, 10 Feb 2015 08:29:45 +0000 (16:29 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 10 Feb 2015 08:31:20 +0000 (16:31 +0800)
Fixes: #10421
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/OSD.h

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