]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: fix pool objects listing
authorYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 10 Jul 2009 20:17:48 +0000 (13:17 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Fri, 10 Jul 2009 20:19:13 +0000 (13:19 -0700)
src/osdc/Objecter.cc

index 81ba990298e318d7b2834809c187b2e419256046..ef657640c019eef5aca9ccffb3f6ec1f5c2cda9e 100644 (file)
@@ -625,13 +625,13 @@ void Objecter::_list_reply(ListContext *list_context, bufferlist *bl, Context *f
     dout(20) << "got a response with objects, proceeding" << dendl;
     list_context->entries->merge(response.entries);
     list_context->max_entries -= response_size;
-    if (list_context->max_entries) //we emptied this pg
-      ++list_context->current_pg;
     dout(20) << "cleaning up and exiting" << dendl;
-    delete bl;
-    final_finish->finish(0);
-    delete final_finish;
-    return;
+    if (!list_context->max_entries) {
+      final_finish->finish(0);
+      delete bl;
+      delete final_finish;
+      return;
+    }
   }
   //if we make this this far, there are no objects left in the current pg, but we want more!
   ++list_context->current_pg;