]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: simplify _do_remove
authorSage Weil <sage@redhat.com>
Tue, 22 Dec 2015 21:11:00 +0000 (16:11 -0500)
committerSage Weil <sage@redhat.com>
Fri, 1 Jan 2016 18:07:26 +0000 (13:07 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index 5cf33180322bdf6c403ade97e784ea4974e6e0ae..3af5ee21f4df9597dfad682ef31bb59e573ae7d9 100644 (file)
@@ -5470,16 +5470,13 @@ int BlueStore::_do_remove(
   CollectionRef& c,
   OnodeRef o)
 {
-  string key;
   _do_truncate(txc, c, o, 0);
-  o->exists = false;
   if (o->onode.omap_head) {
     _do_omap_clear(txc, o->onode.omap_head);
   }
   o->exists = false;
   txc->onodes.erase(o);
-  get_object_key(o->oid, &key);
-  txc->t->rmkey(PREFIX_OBJ, key);
+  txc->t->rmkey(PREFIX_OBJ, o->key);
   return 0;
 }