]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: fix dir auth calculation in CDir::merge
authorYan, Zheng <zyan@redhat.com>
Tue, 9 May 2017 08:28:13 +0000 (16:28 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 9 May 2017 08:28:13 +0000 (16:28 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/CDir.cc

index 9ffe8f1db4acd5bda882cff37c8291b95e8810a3..814625a144f3bb6463779540bafb13f53ace8d8c 100644 (file)
@@ -1014,7 +1014,7 @@ void CDir::merge(list<CDir*>& subs, list<MDSInternalContextBase*>& waiters, bool
 
   mds_authority_t new_auth = CDIR_AUTH_DEFAULT;
   for (auto dir : subs) {
-    if (dir->get_dir_auth() != CDIR_AUTH_DEFAULT ||
+    if (dir->get_dir_auth() != CDIR_AUTH_DEFAULT &&
        dir->get_dir_auth() != new_auth) {
       assert(new_auth == CDIR_AUTH_DEFAULT);
       new_auth = dir->get_dir_auth();