Skip to content

Commit e63f8cc

Browse files
committed
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 <[email protected]>
1 parent 574e3c9 commit e63f8cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mds/MDCache.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10090,8 +10090,9 @@ void MDCache::request_cleanup(const MDRequestRef& mdr)
1009010090
auto new_batch_head = it->second->find_new_head();
1009110091
if (!new_batch_head) {
1009210092
mdr->batch_op_map->erase(it);
10093+
} else {
10094+
mds->finisher->queue(new C_MDS_RetryRequest(this, new_batch_head));
1009310095
}
10094-
mds->finisher->queue(new C_MDS_RetryRequest(this, new_batch_head));
1009510096
}
1009610097

1009710098
if (mdr->has_more()) {

0 commit comments

Comments
 (0)