From: Amnon Hanuhov Date: Wed, 25 Aug 2021 06:22:30 +0000 (+0300) Subject: crimson/os: Use operator[] in CyanStore when inserting values to object omap X-Git-Tag: v17.1.0~1018^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=65d0ec3c963bde990d9e3ab65d0d603d793aff0b;p=ceph.git crimson/os: Use operator[] in CyanStore when inserting values to object omap std::map::insert() doesn't update the value associated with an existing key, therefore we should use operator[] instead Signed-off-by: Amnon Hanuhov --- diff --git a/src/crimson/os/cyanstore/cyan_store.cc b/src/crimson/os/cyanstore/cyan_store.cc index 964025234c10..149f87328a15 100644 --- a/src/crimson/os/cyanstore/cyan_store.cc +++ b/src/crimson/os/cyanstore/cyan_store.cc @@ -576,7 +576,7 @@ int CyanStore::_omap_set_values( ObjectRef o = c->get_or_create_object(oid); for (auto &&i: aset) { - o->omap.insert(std::move(i)); + o->omap[std::move(i.first)] = std::move(i.second); } return 0; }