Skip to content

Commit

Permalink
Merge pull request #20396 from tianshan/cancel_op_miss_update_header
Browse files Browse the repository at this point in the history
rgw: fix index cancel op miss update header

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
yuriw committed Feb 16, 2018
2 parents 08f7686 + 690482d commit 191ab13
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/cls/rgw/cls_rgw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 191ab13

Please sign in to comment.