From: Yunchuan Wen Date: Mon, 24 Nov 2014 07:38:28 +0000 (+0800) Subject: client: fix problem with move files between quota tree X-Git-Tag: v0.91~21^2^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5515cc41a1c0676f2f9b8ad5c15a5895553c96f5;p=ceph.git client: fix problem with move files between quota tree Signed-off-by: Yunchuan Wen --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 20c1cd9941b3..80b6ea685855 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -9029,7 +9029,11 @@ int Client::_rename(Inode *fromdir, const char *fromname, Inode *todir, const ch todir->snapid != CEPH_NOSNAP) { return -EROFS; } - if (get_quota_root(fromdir) != get_quota_root(todir)) { + if (cct->_conf->client_quota && + fromdir != todir && + (fromdir->quota.is_enable() || + todir->quota.is_enable() || + get_quota_root(fromdir) != get_quota_root(todir))) { return -EXDEV; }