From: Kefu Chai Date: Mon, 19 Apr 2021 08:29:08 +0000 (+0800) Subject: Merge pull request #40879 from myoungwon/wip-fix-50299 X-Git-Tag: v17.1.0~2211 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=43940b1b91ce7a7b283e184e5148252c19ac98fd;p=ceph.git Merge pull request #40879 from myoungwon/wip-fix-50299 osd: fix reference leak when ManifestOp is not used Reviewed-by: Samuel Just --- 43940b1b91ce7a7b283e184e5148252c19ac98fd diff --cc src/osd/PrimaryLogPG.h index c83535f2856f,f2da4f7c62dd..6018f366ca28 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@@ -258,23 -257,10 +258,23 @@@ public }; typedef std::shared_ptr FlushOpRef; + struct CLSGatherOp { + OpContext *ctx = nullptr; + ObjectContextRef obc; + OpRequestRef op; + std::vector objecter_tids; + int rval = 0; + + CLSGatherOp(OpContext *ctx_, ObjectContextRef obc_, OpRequestRef op_) + : ctx(ctx_), obc(obc_), op(op_) {} + CLSGatherOp() {} + ~CLSGatherOp() {} + }; + friend struct RefCountCallback; struct ManifestOp { - RefCountCallback *cb; - ceph_tid_t objecter_tid; + RefCountCallback *cb = nullptr; + ceph_tid_t objecter_tid = 0; OpRequestRef op; std::map results; std::map tids;