]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix dump stray command 62517/head
authorIgor Golikov <igolikov@ibm.com>
Sun, 30 Mar 2025 14:17:15 +0000 (14:17 +0000)
committerIgor Golikov <igolikov@ibm.com>
Sun, 11 May 2025 10:00:21 +0000 (10:00 +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 e4dc18ed4c98821ee739ef72ad0e992c7b2ab4a4..f4d6241382f6033172ea93c5bde132222f17c087 100644 (file)
@@ -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<void(int)>&& ext_on_finish) : 
    MDSInternalContext(c->mds), cache(c), dump_formatter(f), on_finish(std::move(ext_on_finish)) {}