From: Kefu Chai Date: Thu, 11 May 2017 05:13:39 +0000 (+0800) Subject: osd/PrimaryLogPG: do not call on_shutdown() if (pg.deleting) X-Git-Tag: v12.0.3~25^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F15040%2Fhead;p=ceph.git osd/PrimaryLogPG: do not call on_shutdown() if (pg.deleting) when a callback is called, it could be facing a PG already shut down by OSD. but if that callback wants to shut that PG down. it should check the PG's status first. Fixes: http://tracker.ceph.com/issues/19902 Signed-off-by: Kefu Chai --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 60922d1a8aa..ba9df21115c 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10230,7 +10230,8 @@ void PrimaryLogPG::on_removal(ObjectStore::Transaction *t) write_if_dirty(*t); - on_shutdown(); + if (!deleting) + on_shutdown(); } void PrimaryLogPG::on_shutdown()