From: Igor Golikov Date: Sun, 30 Mar 2025 14:17:15 +0000 (+0000) Subject: mds: fix dump stray command X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=498ddd12c5db02a6388d845e852aace8158bca93;p=ceph.git mds: fix dump stray command close object section only if it was opened Signed-off-by: Igor Golikov Fixes: https://tracker.ceph.com/issues/70707 --- diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index e4dc18ed4c9..f4d6241382f 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -658,7 +658,9 @@ private: } } void end_dump() { - get_formatter()->close_section(); + if(started) { + get_formatter()->close_section(); + } } C_MDS_DumpStrayDirCtx(MDCache *c, Formatter* f, std::function&& ext_on_finish) : MDSInternalContext(c->mds), cache(c), dump_formatter(f), on_finish(std::move(ext_on_finish)) {}