]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/objecter: fix assert of list_(n)objects 10826/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 23 Aug 2016 08:22:39 +0000 (16:22 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 23 Aug 2016 08:22:39 +0000 (16:22 +0800)
As current_pg of list_context shall always be smaller than
pg_num.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osdc/Objecter.cc

index 742ab02237da1a98f50dce6d874674071744c5d4..63848a39984b4c125989ff5e14f8860cc08ea2d5 100644 (file)
@@ -3481,7 +3481,7 @@ void Objecter::list_nobjects(NListContext *list_context, Context *onfinish)
     list_context->current_pg_epoch = 0;
     list_context->starting_pg_num = pg_num;
   }
-  assert(list_context->current_pg <= pg_num);
+  assert(list_context->current_pg < pg_num);
 
   ObjectOperation op;
   op.pg_nls(list_context->max_entries, list_context->filter,
@@ -3637,7 +3637,7 @@ void Objecter::list_objects(ListContext *list_context, Context *onfinish)
     list_context->current_pg_epoch = 0;
     list_context->starting_pg_num = pg_num;
   }
-  assert(list_context->current_pg <= pg_num);
+  assert(list_context->current_pg < pg_num);
 
   ObjectOperation op;
   op.pg_ls(list_context->max_entries, list_context->filter,