]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix dump stray command 62578/head
authorIgor Golikov <igolikov@ibm.com>
Sun, 30 Mar 2025 14:17:15 +0000 (14:17 +0000)
committerIgor Golikov <igolikov@ibm.com>
Thu, 3 Apr 2025 07:40:00 +0000 (07:40 +0000)
close object section only if it was opened

Signed-off-by: Igor Golikov <igolikov@ibm.com>
Fixes: https://tracker.ceph.com/issues/70707
src/mds/MDCache.h

index 3afea03e7c1a68705575102aeb7fce249c9787ec..7a420dc5f3ccffde3b153ec636774834644f1289 100644 (file)
@@ -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<void(int)>&& ext_on_finish) : 
    MDSInternalContext(c->mds), cache(c), dump_formatter(f), on_finish(std::move(ext_on_finish)) {}