From 568208476c952d373d05c9d0688ebda87f8ad35d Mon Sep 17 00:00:00 2001 From: weiqiaomiao Date: Tue, 12 Jul 2016 19:28:18 +0800 Subject: [PATCH] rgw:clean unuse code in cls_statelog_check_state Signed-off-by: weiqiaomiao --- src/cls/statelog/cls_statelog.cc | 11 +---------- src/cls/statelog/cls_statelog_client.cc | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) 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; -- 2.47.3