Merge pull request #11159 from linuxbox2/rgw-setattr-920

rgw_file: fix set_attrs operation

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Casey Bodley 2016-09-23 10:28:25 -04:00 committed by GitHub
commit 7f228e97bd
2 changed files with 2 additions and 1 deletions

View File

@ -605,6 +605,7 @@ namespace rgw {
rgw_fh->encode_attrs(ux_key, ux_attrs);
/* save attrs */
req.emplace_attr(RGW_ATTR_UNIX_KEY1, std::move(ux_key));
req.emplace_attr(RGW_ATTR_UNIX1, std::move(ux_attrs));
rc = rgwlib.get_fe()->execute_req(&req);

View File

@ -5169,7 +5169,7 @@ void RGWSetAttrs::execute()
store->set_atomic(s->obj_ctx, obj);
if (!s->object.empty()) {
op_ret = store->set_attrs(s->obj_ctx, obj, attrs, &attrs);
op_ret = store->set_attrs(s->obj_ctx, obj, attrs, nullptr);
} else {
for (auto& iter : attrs) {
s->bucket_attrs[iter.first] = std::move(iter.second);