]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix problem with move files between quota tree
authorYunchuan Wen <yunchuanwen@ubuntukylin.com>
Mon, 24 Nov 2014 07:38:28 +0000 (15:38 +0800)
committerYunchuan Wen <yunchuanwen@ubuntukylin.com>
Mon, 24 Nov 2014 07:38:28 +0000 (15:38 +0800)
Signed-off-by: Yunchuan Wen <yunchuanwen@ubuntukylin.com>
src/client/Client.cc

index 20c1cd9941b3bf8baa9d7216ad8d57de8527963c..80b6ea68585525b8f1b542a55bc8495a6a0a4eb7 100644 (file)
@@ -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;
   }