From: Sage Weil Date: Tue, 18 Aug 2015 18:25:38 +0000 (-0400) Subject: common/hobject: make hobject_t::set_key avoid dups X-Git-Tag: v9.1.0~324^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=11a069db354ef15687425e6eb9bf476c4ed170ce;p=ceph.git common/hobject: make hobject_t::set_key avoid dups If the key matches the oid name, clear it. Signed-off-by: Sage Weil --- diff --git a/src/common/hobject.h b/src/common/hobject.h index 321738ce7da..0d74e21478e 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -60,7 +60,10 @@ public: } void set_key(const std::string &key_) { - key = key_; + if (key_ == oid.name) + key.clear(); + else + key = key_; } string to_str() const;