From a4cd631776d924e33067d6d38cae91cdc79b68ee Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 2 Jul 2013 10:19:58 +0200 Subject: [PATCH] set object_info_t pool of an ObjectContext if it is undefined or bad When reading object_info_t from an existing object attribute, the pool may be < 0 and should be set to the pool containing the object. This is done on the oi object on the stack but overriden later by: obc->obs.oi.decode(bv); This decode is superfluous and is removed so that it does not override the modified value of the pool. Signed-off-by: Loic Dachary --- src/osd/ReplicatedPG.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 4ce0404740c8e..20756b6b67cd0 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -4456,7 +4456,6 @@ ObjectContext *ReplicatedPG::get_object_context(const hobject_t& soid, if (can_create) ssc = get_snapset_context(soid.oid, soid.get_key(), soid.hash, true); obc = new ObjectContext(oi, true, ssc); - obc->obs.oi.decode(bv); obc->obs.exists = true; register_object_context(obc); -- 2.39.5