]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: MDCache request cleanup handles potential null mdr
authorAbhishek Lekshmanan <abhishek.lekshmanan@cern.ch>
Tue, 1 Apr 2025 10:04:09 +0000 (12:04 +0200)
committerJos Collin <jcollin@redhat.com>
Tue, 2 Dec 2025 01:45:43 +0000 (07:15 +0530)
In cases where there is a single element in a batch_op_map,new_batch_head
is a nullptr, when this is retried at Finisher we'd hit one of the asserts when
dereferencing

Fixes: https://tracker.ceph.com/issues/70769
Signed-off-by: Abhishek Lekshmanan <abhishek.lekshmanan@cern.ch>
(cherry picked from commit e63f8cc54d03dbdd147cdd2c301adef119a640da)

src/mds/MDCache.cc

index 4ea1fa927b76904ee21ed6a1b30b461f9555fceb..854f31833568c5a1895471f1c159e4eb1db72fa9 100644 (file)
@@ -9960,8 +9960,9 @@ void MDCache::request_cleanup(const MDRequestRef& mdr)
     auto new_batch_head = it->second->find_new_head();
     if (!new_batch_head) {
       mdr->batch_op_map->erase(it);
+    } else {
+      mds->finisher->queue(new C_MDS_RetryRequest(this, new_batch_head));
     }
-    mds->finisher->queue(new C_MDS_RetryRequest(this, new_batch_head));
   }
 
   if (mdr->has_more()) {