From: Yan, Zheng Date: Mon, 14 Sep 2015 01:39:34 +0000 (+0800) Subject: ceph: fix rename into sub-directory check X-Git-Tag: v9.1.0~56^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fef7142c25a665bf6aafc21f37d1da8f349d2eae;p=ceph.git 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 --- 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;