]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: encode bucket info only after setting a flag
authorYehuda Sadeh <yehuda@inktank.com>
Sun, 23 Jun 2013 20:12:26 +0000 (13:12 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Sun, 23 Jun 2013 20:12:26 +0000 (13:12 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index 2562a3afeb38a5fddd8eacc42c83cc72015358bd..685c6eefe66be49cc9dd4abc3072da4b46ff059e 100644 (file)
@@ -4531,12 +4531,12 @@ int RGWRados::put_bucket_info(string& bucket_name, RGWBucketInfo& info, bool exc
 {
   bufferlist bl;
 
-  ::encode(info, bl);
-
   bool create_head = !info.has_instance_obj || create_entry_point;
 
   info.has_instance_obj = true;
 
+  ::encode(info, bl);
+
   string oid;
   get_bucket_meta_oid(info.bucket, oid);
   int ret = rgw_bucket_store_info(this, oid, bl, exclusive, pattrs, objv_tracker, mtime);