From 5c870c60ecc2dbbecc382d2f3f7c562ef5af49be Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 7 Jun 2011 20:40:39 -0700 Subject: [PATCH] mds: CDir::contains() should use projected hierarchy The only current callers are in resolve stage, when nothing is projected. Signed-off-by: Sage Weil --- src/mds/CDir.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index d7390d8e62bcc..c655bc6f5c674 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -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; } } -- 2.39.5