]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
add stray_prior_path for is_stray
authorJashan Kamboj <jashank42@gmail.com>
Thu, 30 Jul 2015 15:43:23 +0000 (21:13 +0530)
committerSage Weil <sage@redhat.com>
Thu, 1 Oct 2015 13:39:34 +0000 (09:39 -0400)
Signed-off-by: Jashan Kamboj <jashank42@gmail.com>
src/mds/Server.cc

index acc2965c820d80476ac3da0d5a575dee56841e97..023eb83612d8534f72cb92efbd22c1a5597a79b5 100644 (file)
@@ -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 /