From: Igor Golikov Date: Sun, 30 Mar 2025 14:17:15 +0000 (+0000) Subject: mds: fix dump stray command X-Git-Tag: v20.3.0~47^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0f62d4f6d9b7c414a4adb05007a17fdcd98161c9;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 3afea03e7c1a..7a420dc5f3cc 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -665,7 +665,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)) {}