Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds/MDCache.h: remove unneeded call to clear func #11954

Merged
merged 1 commit into from Nov 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/mds/MDCache.cc
Expand Up @@ -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 {
Expand All @@ -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
Expand Down Expand Up @@ -1016,7 +1016,7 @@ void MDCache::adjust_bounded_subtree_auth(CDir *dir, set<CDir*>& 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 {
Expand All @@ -1035,7 +1035,7 @@ void MDCache::adjust_bounded_subtree_auth(CDir *dir, set<CDir*>& 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
Expand Down