rgw: encode bucket info only after setting a flag

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2013-06-23 13:12:26 -07:00
parent c3260b2768
commit b09d799f2c

View 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);