]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: wrongly treat symlink inode as normal file/dir when symlink inode is stale on... 9404/head
authorZhi Zhang <willzzhang@tencent.com>
Tue, 3 May 2016 09:12:26 +0000 (17:12 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 31 May 2016 09:49:55 +0000 (11:49 +0200)
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit 88b6d669e37924536152a552db46ef43a7353562)

Conflicts:
src/mds/Server.cc (hammer has req->head.args.open.flags instead of just flags)

src/mds/Server.cc

index d4ed0723962f6e1cddfe3d02131c6f405ead3292..dc9a994b8e935be3dd05ccb6952f560a3c328345 100644 (file)
@@ -2747,7 +2747,7 @@ void Server::handle_client_open(MDRequestRef& mdr)
     respond_to_request(mdr, -ENXIO);                 // FIXME what error do we want?
     return;
     }*/
-  if ((req->head.args.open.flags & O_DIRECTORY) && !cur->inode.is_dir()) {
+  if ((req->head.args.open.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;