diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 8d1da0a4acf..4036e86053d 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -6348,7 +6348,7 @@ next: string marker; do { entries.clear(); - ret = reshard.list(i, marker, max_entries, entries, &is_truncated); + ret = reshard.list(i, marker, max_entries - count, entries, &is_truncated); if (ret < 0) { cerr << "Error listing resharding buckets: " << cpp_strerror(-ret) << std::endl; return ret;