]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix gratuitous map lookup
authorSage Weil <sage.weil@dreamhost.com>
Wed, 23 Feb 2011 23:10:45 +0000 (15:10 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 24 Feb 2011 15:35:32 +0000 (07:35 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/MDCache.cc

index 4ca113c9330f5d0ae51af389ecf0da56755f4c00..c089aac7b4ed33abc45bb5cdfc9b8b3567c14daa 100644 (file)
@@ -3861,8 +3861,9 @@ void MDCache::handle_cache_rejoin_ack(MMDSCacheRejoin *ack)
     dout(10) << " got " << *dir << dendl;
 
     // dentries
-    for (map<string_snap_t,MMDSCacheRejoin::dn_strong>::iterator q = ack->strong_dentries[p->first].begin();
-        q != ack->strong_dentries[p->first].end();
+    map<string_snap_t,MMDSCacheRejoin::dn_strong>& dmap = ack->strong_dentries[p->first];
+    for (map<string_snap_t,MMDSCacheRejoin::dn_strong>::iterator q = dmap.begin();
+        q != dmap.end();
         ++q) {
       CDentry *dn = dir->lookup(q->first.name, q->first.snapid);
       if (!dn) continue;  // must have trimmed?