From: Tianshan Qu Date: Sun, 11 Feb 2018 08:38:21 +0000 (+0800) Subject: rgw: fix index cancel op miss update header X-Git-Tag: v13.0.2~249^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=690482d611c9785df964afc2da9fde63d510bd56;p=ceph.git rgw: fix index cancel op miss update header Signed-off-by: Tianshan Qu --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index 530edfbec93b9..f8d758dd6f4b2 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -854,10 +854,15 @@ int rgw_bucket_complete_op(cls_method_context_t hctx, bufferlist *in, bufferlist if (op.tag.size()) { bufferlist new_key_bl; encode(entry, new_key_bl); - return cls_cxx_map_set_val(hctx, idx, &new_key_bl); - } else { - return 0; + rc = cls_cxx_map_set_val(hctx, idx, &new_key_bl); + if (rc < 0) + return rc; } + + if (op.log_op && !header.syncstopped) { + return write_bucket_header(hctx, &header); + } + return 0; } if (entry.exists) {