From 8e300474fb4dc8f4448262e5974857fb6f1fd42b Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Wed, 2 May 2018 14:31:17 +0800 Subject: [PATCH] osd: Remove useless conditon. Signed-off-by: Jianpeng Ma --- src/osd/OSD.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; } -- 2.47.3