Skip to content

Commit

Permalink
mds: wrongly treat symlink inode as normal file/dir when symlink inod…
Browse files Browse the repository at this point in the history
…e is stale on kcephfs

Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
(cherry picked from commit 88b6d66)

Conflicts:
	src/mds/Server.cc (hammer has req->head.args.open.flags instead of just flags)
  • Loading branch information
Zhi Zhang authored and smithfarm committed May 31, 2016
1 parent a336291 commit f6076dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mds/Server.cc
Expand Up @@ -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;
Expand Down

0 comments on commit f6076dd

Please sign in to comment.