From: Abhishek Lekshmanan Date: Tue, 1 Apr 2025 10:04:09 +0000 (+0200) Subject: mds: MDCache request cleanup handles potential null mdr X-Git-Tag: testing/wip-jcollin-testing-20251203.125108-squid~4^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=02cc17d76c9099603e3331b216807c032a3ad821;p=ceph-ci.git mds: MDCache request cleanup handles potential null mdr 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 (cherry picked from commit e63f8cc54d03dbdd147cdd2c301adef119a640da) --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 66071d385db..d3c8e8a4927 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9916,8 +9916,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()) {