summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-06-23 13:12:26 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-06-23 13:12:26 -0700
commitb09d799f2c122a4c455f84f1bfcefe6e58b70b2f (patch)
tree646a4004f7198d7017a743a812e1567b1c290d75
parentc3260b276882beedb52f7c77c622a9b77537a63f (diff)
downloadceph-b09d799f2c122a4c455f84f1bfcefe6e58b70b2f.tar.gz
rgw: encode bucket info only after setting a flag
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_rados.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 2562a3afeb3..685c6eefe66 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -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);