From: xie xingguo Date: Sat, 26 Aug 2017 08:54:40 +0000 (+0800) Subject: osd/PrimaryLogPG: maybe_handle_manifest_detail - sanity check obc existence X-Git-Tag: v13.0.1~972^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=56105b8c88ca0e2a2404af6d34247a5956ce160c;p=ceph.git osd/PrimaryLogPG: maybe_handle_manifest_detail - sanity check obc existence Signed-off-by: xie xingguo --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index d05ced7d46cf..2e56f758ce4f 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;