]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/filestore: remove redudant check. 18777/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 7 Nov 2017 14:42:59 +0000 (22:42 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 17 Nov 2017 11:22:37 +0000 (19:22 +0800)
If next is null, we already set a non-null to it. So don't check again.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/filestore/FileStore.cc

index 35e99d667638a06da8bd1f4900809e225ad583d3..cd453973839769c0491c0268976a4074e8144a45 100644 (file)
@@ -5024,7 +5024,7 @@ int FileStore::collection_list(const coll_t& c,
   dout(20) << "objects: " << *ls << dendl;
 
   // HashIndex doesn't know the pool when constructing a 'next' value
-  if (next && !next->is_max()) {
+  if (!next->is_max()) {
     next->hobj.pool = pool;
     next->set_shard(shard);
     dout(20) << "  next " << *next << dendl;