From 0f62d4f6d9b7c414a4adb05007a17fdcd98161c9 Mon Sep 17 00:00:00 2001 From: Igor Golikov Date: Sun, 30 Mar 2025 14:17:15 +0000 Subject: [PATCH] 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 --- src/mds/MDCache.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index 3afea03e7c1..7a420dc5f3c 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)) {} -- 2.39.5