]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: CDir::contains() should use projected hierarchy
authorSage Weil <sage.weil@dreamhost.com>
Wed, 8 Jun 2011 03:40:39 +0000 (20:40 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Wed, 8 Jun 2011 03:40:39 +0000 (20:40 -0700)
The only current callers are in resolve stage, when nothing is projected.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/CDir.cc

index d7390d8e62bcc4b8f1eda16ad51c659c19db8512..c655bc6f5c67402b603848592f067e9f81e555ba 100644 (file)
@@ -2201,9 +2201,11 @@ bool CDir::is_subtree_root()
 bool CDir::contains(CDir *x)
 {
   while (1) {
-    if (x == this) return true;
-    x = x->get_parent_dir();
-    if (x == 0) return false;    
+    if (x == this)
+      return true;
+    x = x->get_inode()->get_projected_parent_dir();
+    if (x == 0)
+      return false;    
   }
 }