From 56105b8c88ca0e2a2404af6d34247a5956ce160c Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sat, 26 Aug 2017 16:54:40 +0800 Subject: [PATCH] osd/PrimaryLogPG: maybe_handle_manifest_detail - sanity check obc existence Signed-off-by: xie xingguo --- src/osd/PrimaryLogPG.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d05ced7d46cfd..2e56f758ce4f2 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -2344,19 +2344,15 @@ PrimaryLogPG::cache_result_t PrimaryLogPG::maybe_handle_manifest_detail( bool write_ordered, ObjectContextRef obc) { + assert(obc); if (static_cast(op->get_req())->get_flags() & CEPH_OSD_FLAG_IGNORE_REDIRECT) { dout(20) << __func__ << ": ignoring redirect due to flag" << dendl; return cache_result_t::NOOP; } - if (obc) - dout(10) << __func__ << " " << obc->obs.oi << " " - << (obc->obs.exists ? "exists" : "DNE") - << dendl; - // if it is write-ordered and blocked, stop now - if (obc.get() && obc->is_blocked() && write_ordered) { + if (obc->is_blocked() && write_ordered) { // we're already doing something with this object dout(20) << __func__ << " blocked on " << obc->obs.oi.soid << dendl; return cache_result_t::NOOP; -- 2.39.5