From: Jashan Kamboj Date: Thu, 30 Jul 2015 15:43:23 +0000 (+0530) Subject: add stray_prior_path for is_stray X-Git-Tag: v10.0.0~123^2~46 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6cd7306682333ceac5f8bbb342896acd8ad80b81;p=ceph.git add stray_prior_path for is_stray Signed-off-by: Jashan Kamboj --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index acc2965c820d..023eb83612d8 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -2130,7 +2130,13 @@ bool Server::check_access(MDRequestRef& mdr, CInode *in, unsigned mask) // FIXME: behave with inodes in stray dir // FIXME: behave with hard links string path; - in->make_path_string(path, false, in->get_projected_parent_dn()); + + if (in->is_stray()){ + path = in->get_projected_inode()->stray_prior_path; + } + else{ + in->make_path_string(path, false, in->get_projected_parent_dn()); + } if (path.length()) path = path.substr(1); // drop leading /