]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
HashIndex: _collection_list_partial must tolerate NULL next
authorSamuel Just <sam.just@inktank.com>
Tue, 5 Mar 2013 23:49:26 +0000 (15:49 -0800)
committerSamuel Just <sam.just@inktank.com>
Thu, 14 Mar 2013 01:14:43 +0000 (18:14 -0700)
Backport: bobtail
Fixes: #4379
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/os/HashIndex.cc

index a1d369d8e509f705d6ec57ef7a0bcf29ad2614c4..b3902b056a55d3eaa44be2d1e3268bf174a1f77b 100644 (file)
@@ -328,6 +328,9 @@ int HashIndex::_collection_list_partial(const hobject_t &start,
                                        vector<hobject_t> *ls,
                                        hobject_t *next) {
   vector<string> path;
+  hobject_t _next;
+  if (!next)
+    next = &_next;
   *next = start;
   dout(20) << "_collection_list_partial " << start << " " << min_count << "-" << max_count << " ls.size " << ls->size() << dendl;
   return list_by_hash(path, min_count, max_count, seq, next, ls);