From: Orit Wasserman Date: Tue, 1 May 2018 15:41:29 +0000 (+0300) Subject: rgw: fix bi_list to return max entries not max-1 X-Git-Tag: v12.2.8~81^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=35efc4eb6161b9258593ad850e812cb20e524fd3;p=ceph.git rgw: fix bi_list to return max entries not max-1 Fixes: http://tracker.ceph.com/issues/24483 Signed-off-by: Orit Wasserman (cherry picked from commit fc44655b80d818a179a9ce6bf4aa52df13c98fc1) --- diff --git a/src/cls/rgw/cls_rgw.cc b/src/cls/rgw/cls_rgw.cc index c24405a669c7..c30b5408bd50 100644 --- a/src/cls/rgw/cls_rgw.cc +++ b/src/cls/rgw/cls_rgw.cc @@ -2549,7 +2549,7 @@ static int rgw_bi_list_op(cls_method_context_t hctx, bufferlist *in, bufferlist } op_ret.is_truncated = (count >= max) || more; - while (count >= max) { + while (count > max) { op_ret.entries.pop_back(); count--; }