]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/seastore/onode_tree: fix recorder nullptr case 39911/head
authorYingxin Cheng <yingxin.cheng@intel.com>
Fri, 12 Mar 2021 08:13:16 +0000 (16:13 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Wed, 17 Mar 2021 01:47:20 +0000 (09:47 +0800)
The value recorder can be nullptr if the extent is fresh.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/crimson/os/seastore/onode_manager/staged-fltree/fltree_onode_manager.h

index 39cdf5ab91c7203b32d54b29708ec35dbb48ba7a..6255b10809d5d3b58555725303a67ed67a412966 100644 (file)
@@ -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;
   }