From: Jianpeng Ma Date: Wed, 2 May 2018 06:31:17 +0000 (+0800) Subject: osd: Remove useless conditon. X-Git-Tag: v14.0.0~227^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21766%2Fhead;p=ceph.git osd: Remove useless conditon. Signed-off-by: Jianpeng Ma --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 1285c22dce15..1bd49412269a 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9744,9 +9744,7 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb) // raced with _wake_pg_slot or consume_map dout(20) << __func__ << " " << token << " nothing queued" << dendl; - if (pg) { - pg->unlock(); - } + pg->unlock(); sdata->shard_lock.Unlock(); return; } @@ -9755,9 +9753,7 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb) << " requeue_seq " << slot->requeue_seq << " > our " << requeue_seq << ", we raced with _wake_pg_slot" << dendl; - if (pg) { - pg->unlock(); - } + pg->unlock(); sdata->shard_lock.Unlock(); return; }