]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix bi_list to return max entries not max-1
authorOrit Wasserman <owasserm@redhat.com>
Tue, 1 May 2018 15:41:29 +0000 (18:41 +0300)
committerNathan Cutler <ncutler@suse.com>
Wed, 4 Jul 2018 07:18:16 +0000 (09:18 +0200)
Fixes: http://tracker.ceph.com/issues/24483
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
(cherry picked from commit fc44655b80d818a179a9ce6bf4aa52df13c98fc1)

src/cls/rgw/cls_rgw.cc

index c24405a669c7c19ff238931821fd99b530c72e3c..c30b5408bd505e6d6e8de63e19f536caa3fc3388 100644 (file)
@@ -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--;
   }