]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_file: fix assert upon setattr on bucket 15679/head
authorGui Hecheng <guihecheng@cmss.chinamobile.com>
Wed, 14 Jun 2017 07:03:36 +0000 (15:03 +0800)
committerGui Hecheng <guihecheng@cmss.chinamobile.com>
Wed, 14 Jun 2017 07:22:47 +0000 (15:22 +0800)
Fixes: http://tracker.ceph.com/issues/20287
Signed-off-by: Gui Hecheng <guihecheng@cmss.chinamobile.com>
src/rgw/rgw_op.cc

index 7005490d4a431b88d1a29a3be4f764131a5b0056..aa5b0dbfce7d9271c73367f54a1dc32304087be8 100644 (file)
@@ -6259,9 +6259,8 @@ void RGWSetAttrs::execute()
 
   rgw_obj obj(s->bucket, s->object);
 
-  store->set_atomic(s->obj_ctx, obj);
-
   if (!s->object.empty()) {
+    store->set_atomic(s->obj_ctx, obj);
     op_ret = store->set_attrs(s->obj_ctx, s->bucket_info, obj, attrs, nullptr);
   } else {
     for (auto& iter : attrs) {