From: Zhi Zhang Date: Tue, 3 May 2016 09:12:26 +0000 (+0800) Subject: mds: wrongly treat symlink inode as normal file/dir when symlink inode is stale on... X-Git-Tag: v11.0.0~438^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=88b6d669e37924536152a552db46ef43a7353562;p=ceph.git mds: wrongly treat symlink inode as normal file/dir when symlink inode is stale on kcephfs Signed-off-by: Zhi Zhang --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 750fb418cef4..928c2c8c4fd7 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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;