]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
fragtree_t: fix get_leaves_under()
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 6 Mar 2014 03:20:56 +0000 (11:20 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Wed, 19 Mar 2014 03:35:56 +0000 (11:35 +0800)
If fragtree is (*^1) and the caller wants leaves under frag 00*.
get_leaves_under() should return empty list.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/include/frag.h

index fbe5b43f8cbe010e7475ca610d6ac8927fb68d32..f98765a30c7b0236ba04852589b6ebb4ca44371b 100644 (file)
@@ -295,7 +295,7 @@ public:
       int nb = get_split(t);
       if (nb) 
        t.split(nb, q);   // queue up children
-      else 
+      else if (x.contains(t))
        ls.push_back(t);  // not spit, it's a leaf.
     }
   }