]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: wrongly treat symlink inode as normal file/dir when symlink inode is stale on... 8906/head
authorZhi Zhang <willzzhang@tencent.com>
Tue, 3 May 2016 09:12:26 +0000 (17:12 +0800)
committerZhi Zhang <willzzhang@tencent.com>
Tue, 3 May 2016 09:12:26 +0000 (17:12 +0800)
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
src/mds/Server.cc

index 750fb418cef48086229e5beccf5622ee8f9d2270..928c2c8c4fd7207002daa95d98b60492b7013d57 100644 (file)
@@ -2908,7 +2908,7 @@ void Server::handle_client_open(MDRequestRef& mdr)
     respond_to_request(mdr, -ENXIO);                 // FIXME what error do we want?
     return;
     }*/
-  if ((flags & O_DIRECTORY) && !cur->inode.is_dir()) {
+  if ((flags & O_DIRECTORY) && !cur->inode.is_dir() && !cur->inode.is_symlink()) {
     dout(7) << "specified O_DIRECTORY on non-directory " << *cur << dendl;
     respond_to_request(mdr, -EINVAL);
     return;