From: Jianpeng Ma Date: Mon, 9 Apr 2018 00:23:20 +0000 (+0800) Subject: osdc: Remove useless condition. X-Git-Tag: v13.1.0~245^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0fa70515a670b66c9c17bb41a6aa59931ffe8ab5;p=ceph.git osdc: Remove useless condition. If Op/CommandOp in a OSDSesion, the filed session of Op/CommandOp must not null. And in _scan_reuqests it always get the unique_lock of OSDSession. Signed-off-by: Jianpeng Ma --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index ec4e0e2e72e..f766a430141 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -1097,9 +1097,7 @@ void Objecter::_scan_requests( break; // -- fall-thru -- case RECALC_OP_TARGET_NEED_RESEND: - if (op->session) { - _session_op_remove(op->session, op); - } + _session_op_remove(op->session, op); need_resend[op->tid] = op; _op_cancel_map_check(op); break; @@ -1128,9 +1126,7 @@ void Objecter::_scan_requests( // -- fall-thru -- case RECALC_OP_TARGET_NEED_RESEND: need_resend_command[c->tid] = c; - if (c->session) { - _session_command_op_remove(c->session, c); - } + _session_command_op_remove(c->session, c); _command_cancel_map_check(c); break; case RECALC_OP_TARGET_POOL_DNE: