From 2aec591cfe1ba69631860b4886d34de80f752bd7 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 11 May 2017 13:13:39 +0800 Subject: [PATCH] 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 (cherry picked from commit f3c44a0dfc859f6f625a92e727e0e521ed4a9207) --- src/osd/PrimaryLogPG.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 57d09420743d9..f8dbee8b134bd 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10120,7 +10120,8 @@ void PrimaryLogPG::on_removal(ObjectStore::Transaction *t) write_if_dirty(*t); - on_shutdown(); + if (!deleting) + on_shutdown(); } void PrimaryLogPG::on_shutdown() -- 2.39.5