From 988b68995edd6d5c0da542a122b525c8aee92f24 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 11 May 2026 13:46:25 +0800 Subject: [PATCH] crimson: consolidate the return paths of get_segment_manager() before this change, two branches both return `BlockSegmentManager`, which is redundant. in this change, consolidate them so that the `HAVE_ZNS` path becomes an early return. this improves readability. Signed-off-by: Kefu Chai --- src/crimson/os/seastore/segment_manager.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/crimson/os/seastore/segment_manager.cc b/src/crimson/os/seastore/segment_manager.cc index 90a95be0a430..0672b84a1374 100644 --- a/src/crimson/os/seastore/segment_manager.cc +++ b/src/crimson/os/seastore/segment_manager.cc @@ -44,12 +44,9 @@ SegmentManager::get_segment_manager( INFO("Found {} zones.", nr_zones); if (nr_zones != 0) { co_return std::make_unique(device + "/block"); - } else { - co_return std::make_unique(device + "/block", dtype); } -#else - co_return std::make_unique(device + "/block", dtype); #endif + co_return std::make_unique(device + "/block", dtype); } } // namespace crimson::os::seastore -- 2.47.3