From: Michal Jarzabek Date: Sun, 13 Nov 2016 19:44:07 +0000 (+0000) Subject: mds/MDCache.h: remove unneeded call to clear func X-Git-Tag: v11.1.0~298^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11954%2Fhead;p=ceph.git mds/MDCache.h: remove unneeded call to clear func Signed-off-by: Michal Jarzabek --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 9044fd573ea2..06e7520b865b 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -817,7 +817,7 @@ void MDCache::adjust_subtree_auth(CDir *dir, mds_authority_t auth, bool do_eval) if (dir->inode->is_base()) { root = dir; // bootstrap hack. if (subtrees.count(root) == 0) { - subtrees[root].clear(); + subtrees[root]; root->get(CDir::PIN_SUBTREE); } } else { @@ -834,7 +834,7 @@ void MDCache::adjust_subtree_auth(CDir *dir, mds_authority_t auth, bool do_eval) // i am a new subtree. dout(10) << " new subtree at " << *dir << dendl; assert(subtrees.count(dir) == 0); - subtrees[dir].clear(); // create empty subtree bounds list for me. + subtrees[dir]; // create empty subtree bounds list for me. dir->get(CDir::PIN_SUBTREE); // set dir_auth @@ -1016,7 +1016,7 @@ void MDCache::adjust_bounded_subtree_auth(CDir *dir, set& bounds, mds_aut if (dir->ino() == MDS_INO_ROOT) { root = dir; // bootstrap hack. if (subtrees.count(root) == 0) { - subtrees[root].clear(); + subtrees[root]; root->get(CDir::PIN_SUBTREE); } } else { @@ -1035,7 +1035,7 @@ void MDCache::adjust_bounded_subtree_auth(CDir *dir, set& bounds, mds_aut // i am a new subtree. dout(10) << " new subtree at " << *dir << dendl; assert(subtrees.count(dir) == 0); - subtrees[dir].clear(); // create empty subtree bounds list for me. + subtrees[dir]; // create empty subtree bounds list for me. dir->get(CDir::PIN_SUBTREE); // set dir_auth