]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/crimson/osd/scrub: fix the null pointer error 58471/head
authorjunxiang Mu <1948535941@qq.com>
Tue, 9 Jul 2024 07:37:34 +0000 (15:37 +0800)
committerjunxiang Mu <1948535941@qq.com>
Tue, 9 Jul 2024 15:53:31 +0000 (23:53 +0800)
Fixes: https://tracker.ceph.com/issues/66405
Signed-off-by: junxiang Mu <1948535941@qq.com>
src/crimson/osd/scrub/scrub_validator.cc

index a3979f790bca4d1e99b9d1bc43f73e77e69f9a4e..9b38d2a89ecac8a4e772cbbc6c8dc67f1b78a2b3 100644 (file)
@@ -60,13 +60,15 @@ shard_evaluation_t evaluate_object_shard(
   if (from == policy.primary) {
     ret.shard_info.primary = true;
   }
-  if (!maybe_obj || maybe_obj->negative) {
-    // impossible since chunky scrub was introduced
-    ceph_assert(!maybe_obj->negative);
+
+  if (!maybe_obj) {
     ret.shard_info.set_missing();
     return ret;
   }
 
+  // impossible since chunky scrub was introduced
+  ceph_assert(!maybe_obj->negative);
+
   auto &obj = *maybe_obj;
   /* We are ignoring ScrubMap::object::large_omap_object*, object_omap_* is all the
    * info we need */