summaryrefslogtreecommitdiffstats
path: root/src/cls
diff options
context:
space:
mode:
Diffstat (limited to 'src/cls')
-rw-r--r--src/cls/rgw/cls_rgw.cc1
-rw-r--r--src/cls/rgw/cls_rgw_client.cc7
-rw-r--r--src/cls/rgw/cls_rgw_client.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc
index af520b6bb0e..8f0190d4218 100644
--- a/src/cls/rgw/cls_rgw.cc
+++ b/src/cls/rgw/cls_rgw.cc
@@ -2914,7 +2914,6 @@ static int rgw_bi_put_op(cls_method_context_t hctx, bufferlist *in, bufferlist *
}
rgw_cls_bi_entry& entry = op.entry;
-
if (entry.type == BIIndexType::ReshardDeleted) {
int r = cls_cxx_map_remove_key(hctx, entry.idx);
if (r < 0) {
diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc
index a9b1a5bdb1c..c5ac99eada0 100644
--- a/src/cls/rgw/cls_rgw_client.cc
+++ b/src/cls/rgw/cls_rgw_client.cc
@@ -471,12 +471,12 @@ int cls_rgw_bi_get(librados::IoCtx& io_ctx, const string oid,
}
int cls_rgw_bi_get_vals(librados::IoCtx& io_ctx, const std::string oid,
- std::set<std::string> log_entries_wanted,
+ std::set<std::string>& log_entries_wanted,
std::list<rgw_cls_bi_entry> *entries)
{
bufferlist in, out;
struct rgw_cls_bi_get_vals_op call;
- call.log_entries_wanted = log_entries_wanted;
+ call.log_entries_wanted = std::move(log_entries_wanted);
encode(call, in);
int r = io_ctx.exec(oid, RGW_CLASS, RGW_BI_GET_VALS, in, out);
if (r < 0)
@@ -490,7 +490,8 @@ int cls_rgw_bi_get_vals(librados::IoCtx& io_ctx, const std::string oid,
return -EIO;
}
- entries->swap(op_ret.entries);
+ if (entries)
+ entries->swap(op_ret.entries);
return 0;
}
diff --git a/src/cls/rgw/cls_rgw_client.h b/src/cls/rgw/cls_rgw_client.h
index c5336030c07..86c40dc9278 100644
--- a/src/cls/rgw/cls_rgw_client.h
+++ b/src/cls/rgw/cls_rgw_client.h
@@ -384,7 +384,7 @@ int cls_rgw_bi_get(librados::IoCtx& io_ctx, const std::string oid,
BIIndexType index_type, const cls_rgw_obj_key& key,
rgw_cls_bi_entry *entry);
int cls_rgw_bi_get_vals(librados::IoCtx& io_ctx, const std::string oid,
- std::set<std::string> log_entries_wanted,
+ std::set<std::string>& log_entries_wanted,
std::list<rgw_cls_bi_entry> *entries);
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const std::string oid, const rgw_cls_bi_entry& entry);
void cls_rgw_bi_put(librados::ObjectWriteOperation& op, const std::string oid, const rgw_cls_bi_entry& entry);