Skip to content

Commit 0f62d4f

Browse files
committed
mds: fix dump stray command
close object section only if it was opened Signed-off-by: Igor Golikov <[email protected]> Fixes: https://tracker.ceph.com/issues/70707
1 parent 4034cae commit 0f62d4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mds/MDCache.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,9 @@ class MDCache {
665665
}
666666
}
667667
void end_dump() {
668-
get_formatter()->close_section();
668+
if(started) {
669+
get_formatter()->close_section();
670+
}
669671
}
670672
C_MDS_DumpStrayDirCtx(MDCache *c, Formatter* f, std::function<void(int)>&& ext_on_finish) :
671673
MDSInternalContext(c->mds), cache(c), dump_formatter(f), on_finish(std::move(ext_on_finish)) {}

0 commit comments

Comments
 (0)