]> git-server-git.apps.pok.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>
Fri, 15 Mar 2013 19:08:22 +0000 (12:08 -0700)
Backport: bobtail
Fixes: #4379
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit ce4432adc67dc2fc06dd21ea08e59d179496bcc6)

src/os/HashIndex.cc

index d0d155c8d18d2cff68b8046e7ecdcbddd4112fb5..5e880e1e30a42ecf8d6a97b65bf8c5a52e73f288 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);