From 58fbde2848e805adac66bc091c82a0a034fef7e3 Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Fri, 12 Mar 2021 16:13:16 +0800 Subject: [PATCH] crimson/seastore/onode_tree: fix recorder nullptr case The value recorder can be nullptr if the extent is fresh. Signed-off-by: Yingxin Cheng --- .../onode_manager/staged-fltree/fltree_onode_manager.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.h b/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.h index 39cdf5ab91c72..6255b10809d5d 100644 --- a/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.h +++ b/src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.h @@ -70,8 +70,10 @@ struct FLTreeOnode : Onode, Value { auto p = prepare_mutate_payload< onode_layout_t, Recorder>(t); - p.second->record_delta( - p.first); + if (p.second) { + p.second->record_delta( + p.first); + } status = status_t::STABLE; } -- 2.39.5