summaryrefslogtreecommitdiffstats
path: root/src/mds/Server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds/Server.cc')
-rw-r--r--src/mds/Server.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index c01e6cbe5ee..0e6f8e4b96e 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -7494,15 +7494,13 @@ void Server::handle_client_rename(MDRequestRef& mdr)
dout(10) << "srci is remote dir, setting stickydirs and opening all frags" << dendl;
mdr->set_stickydirs(srci);
- list<frag_t> frags;
- srci->dirfragtree.get_leaves(frags);
- for (list<frag_t>::iterator p = frags.begin();
- p != frags.end();
- ++p) {
- CDir *dir = srci->get_dirfrag(*p);
+ frag_vec_t leaves;
+ srci->dirfragtree.get_leaves(leaves);
+ for (const auto& leaf : leaves) {
+ CDir *dir = srci->get_dirfrag(leaf);
if (!dir) {
- dout(10) << " opening " << *p << " under " << *srci << dendl;
- mdcache->open_remote_dirfrag(srci, *p, new C_MDS_RetryRequest(mdcache, mdr));
+ dout(10) << " opening " << leaf << " under " << *srci << dendl;
+ mdcache->open_remote_dirfrag(srci, leaf, new C_MDS_RetryRequest(mdcache, mdr));
return;
}
}