]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objclass: fix cls_cxx_map_write_header
authorYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Wed, 7 Mar 2012 18:45:13 +0000 (10:45 -0800)
committerYehuda Sadeh <yehuda.sadeh@dreamhost.com>
Wed, 7 Mar 2012 18:45:13 +0000 (10:45 -0800)
Claiming the buffer instead of encoding it.

Signed-off-by: Yehuda Sadeh <yehuda.sadeh@dreamhost.com>
src/objclass/class_api.cc

index ba3bb84e7e67181500e4726c0cb0042345d9723a..50d736353092c982deeef40db48853e5b67d1373 100644 (file)
@@ -367,8 +367,7 @@ int cls_cxx_map_write_header(cls_method_context_t hctx, bufferlist *inbl)
   ReplicatedPG::OpContext **pctx = (ReplicatedPG::OpContext **)hctx;
   vector<OSDOp> ops(1);
   OSDOp& op = ops[0];
-  bufferlist& update_bl = op.indata;
-  ::encode(*inbl, update_bl);
+  op.indata.claim(*inbl);
 
   op.op.op = CEPH_OSD_OP_OMAPSETHEADER;