From 7661a357f07a4e0f34373f7d2a55dca127f1e1fc Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 16 Apr 2021 09:28:09 +0800 Subject: [PATCH] osd: remove C_SetManifestRefCountDone::mop as it is not referenced after being assigned. see also https://tracker.ceph.com/issues/50299 Signed-off-by: Kefu Chai --- src/osd/PrimaryLogPG.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 45559207b2b..577038197f4 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -3339,13 +3339,12 @@ struct SetManifestFinisher : public PrimaryLogPG::OpFinisher { struct C_SetManifestRefCountDone : public Context { PrimaryLogPGRef pg; - PrimaryLogPG::ManifestOpRef mop; hobject_t soid; uint64_t offset; - ceph_tid_t tid; + ceph_tid_t tid = 0; C_SetManifestRefCountDone(PrimaryLogPG *p, - PrimaryLogPG::ManifestOpRef mop, hobject_t soid, uint64_t offset) : - pg(p), mop(mop), soid(soid), offset(offset), tid(0) {} + hobject_t soid, uint64_t offset) : + pg(p), soid(soid), offset(offset) {} void finish(int r) override { if (r == -ECANCELED) return; @@ -3568,7 +3567,7 @@ bool PrimaryLogPG::inc_refcount_by_set(OpContext* ctx, object_manifest_t& set_ch auto target_oid = p->first; auto offset = c.first; auto length = c.second.length; - C_SetManifestRefCountDone* fin = new C_SetManifestRefCountDone(this, mop, ctx->obs->oi.soid, offset); + auto* fin = new C_SetManifestRefCountDone(this, ctx->obs->oi.soid, offset); ceph_tid_t tid = refcount_manifest(ctx->obs->oi.soid, target_oid, refcount_t::INCREMENT_REF, fin, std::nullopt); fin->tid = tid; @@ -7083,7 +7082,7 @@ int PrimaryLogPG::do_osd_ops(OpContext *ctx, vector& ops) ctx->op_finishers[ctx->current_osd_subop_num].reset( new SetManifestFinisher(osd_op)); ManifestOpRef mop = std::make_shared(new RefCountCallback(ctx, osd_op)); - C_SetManifestRefCountDone* fin = new C_SetManifestRefCountDone(this, mop, soid, 0); + auto* fin = new C_SetManifestRefCountDone(this, soid, 0); ceph_tid_t tid = refcount_manifest(soid, target, refcount_t::INCREMENT_REF, fin, std::nullopt); fin->tid = tid; -- 2.39.5