From: weiqiaomiao Date: Tue, 12 Jul 2016 11:28:18 +0000 (+0800) Subject: rgw:clean unuse code in cls_statelog_check_state X-Git-Tag: v12.0.3~30^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10260%2Fhead;p=ceph.git rgw:clean unuse code in cls_statelog_check_state Signed-off-by: weiqiaomiao --- diff --git a/src/cls/statelog/cls_statelog.cc b/src/cls/statelog/cls_statelog.cc index f2cbbf79672e..4909d63e85c0 100644 --- a/src/cls/statelog/cls_statelog.cc +++ b/src/cls/statelog/cls_statelog.cc @@ -279,19 +279,10 @@ static int cls_statelog_check_state(cls_method_context_t hctx, bufferlist *in, b return -EINVAL; } - string obj_index; - get_index_by_object(op.object, op.op_id, obj_index); - - bufferlist bl; - int rc = cls_cxx_map_get_val(hctx, obj_index, &bl); - if (rc < 0) { - CLS_LOG(0, "could not find entry %s", obj_index.c_str()); - return rc; - } cls_statelog_entry entry; - rc = get_existing_entry(hctx, op.client_id, op.op_id, op.object, entry); + int rc = get_existing_entry(hctx, op.client_id, op.op_id, op.object, entry); if (rc < 0) return rc; diff --git a/src/cls/statelog/cls_statelog_client.cc b/src/cls/statelog/cls_statelog_client.cc index 2ba38686a08e..bd9eb39fe835 100644 --- a/src/cls/statelog/cls_statelog_client.cc +++ b/src/cls/statelog/cls_statelog_client.cc @@ -114,7 +114,6 @@ void cls_statelog_list(librados::ObjectReadOperation& op, void cls_statelog_check_state(librados::ObjectOperation& op, const string& client_id, const string& op_id, const string& object, uint32_t state) { bufferlist inbl; - bufferlist outbl; cls_statelog_check_state_op call; call.client_id = client_id; call.op_id = op_id;