]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: fix untracked ObjectContextRef
authormyoungwon oh <omwmw@sk.com>
Wed, 22 Nov 2017 16:40:27 +0000 (01:40 +0900)
committermyoungwon oh <omwmw@sk.com>
Wed, 22 Nov 2017 16:40:27 +0000 (01:40 +0900)
referecnce leak occur if sub_cop has ObjectContextRef

Signed-off-by: Myoungwon Oh <omwmw@sk.com>
src/osd/PrimaryLogPG.cc

index eb4e23bbc005433b42e83100bfc74c384c8874df..53efbc62f3c6167f7c9f2ebdbd466ec7f6b1e7eb 100644 (file)
@@ -8378,7 +8378,8 @@ void PrimaryLogPG::_copy_some_manifest(ObjectContextRef obc, CopyOpRef cop, uint
     uint64_t length = manifest->chunk_map[iter->first].length;
     hobject_t soid = manifest->chunk_map[iter->first].oid;
     object_locator_t oloc(soid);
-    CopyOpRef sub_cop(std::make_shared<CopyOp>(cop->cb, cop->obc, cop->src, oloc,
+    CopyCallback * cb = NULL;
+    CopyOpRef sub_cop(std::make_shared<CopyOp>(cb, ObjectContextRef(), cop->src, oloc,
                       cop->results.user_version, cop->flags, cop->mirror_snapset,
                       cop->src_obj_fadvise_flags, cop->dest_obj_fadvise_flags));
     sub_cop->cursor.data_offset = obj_offset;