From fef7142c25a665bf6aafc21f37d1da8f349d2eae Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Mon, 14 Sep 2015 09:39:34 +0800 Subject: [PATCH] ceph: fix rename into sub-directory check the check is important for FreeBSD because there is such check in its kernel. Signed-off-by: Yan, Zheng --- src/mds/Server.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 7dfaaa24e07e..da6475b5fb15 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -5927,7 +5927,7 @@ void Server::handle_client_rename(MDRequestRef& mdr) // dest a child of src? // e.g. mv /usr /usr/foo - CDentry *pdn = destdir->inode->parent; + CDentry *pdn = destdir->inode->get_projected_parent_dn(); while (pdn) { if (pdn == srcdn) { dout(7) << "cannot rename item to be a child of itself" << dendl; -- 2.47.3