From d1b6cadd6c1514aeacfbacec253305e1a715c387 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Thu, 27 Jul 2017 12:06:23 -0700 Subject: mds: cleanup replica_map access The gymnastics protecting the map failed as the code evolved. Just expose it normally with a getter. Signed-off-by: Patrick Donnelly --- src/mds/SimpleLock.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/mds/SimpleLock.h') diff --git a/src/mds/SimpleLock.h b/src/mds/SimpleLock.h index 27eae7bebd4..56d1c4b0b7e 100644 --- a/src/mds/SimpleLock.h +++ b/src/mds/SimpleLock.h @@ -373,10 +373,9 @@ public: } void init_gather() { - for (compact_map::iterator p = parent->replicas_begin(); - p != parent->replicas_end(); - ++p) - more()->gather_set.insert(p->first); + for (const auto p : parent->get_replicas()) { + more()->gather_set.insert(p.first); + } } bool is_gathering() const { return have_more() && !more()->gather_set.empty(); -- cgit v1.2.3