From 1109a59e2941cf4b16798cd04941daf350ec0d22 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Fri, 15 Jan 2021 18:38:12 +0900 Subject: [PATCH] osd: remove unnecessary check Signed-off-by: Myoungwon Oh --- src/osd/PrimaryLogPG.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 6cafd70ad9523..56266a70cb409 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -3356,11 +3356,9 @@ int PrimaryLogPG::get_manifest_ref_count(ObjectContextRef obc, std::string& fp_o obc_g ? &(obc_g->obs.oi.manifest) : nullptr , nullptr, refs); - if (!refs.is_empty()) { - for (auto p = refs.begin(); p != refs.end(); ++p) { - if (p->first.oid.name == fp_oid && p->second > 0) { - cnt += p->second; - } + for (auto p = refs.begin(); p != refs.end(); ++p) { + if (p->first.oid.name == fp_oid && p->second > 0) { + cnt += p->second; } } } -- 2.39.5