summaryrefslogtreecommitdiffstats
path: root/src/mds/SimpleLock.h
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2017-07-27 21:06:23 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2017-09-13 00:46:22 +0200
commitd1b6cadd6c1514aeacfbacec253305e1a715c387 (patch)
treec7ae1ba04ee42ac6812bc2f06837d650bece9c5a /src/mds/SimpleLock.h
parentcommon: add alloc_ptr smart pointer (diff)
downloadceph-d1b6cadd6c1514aeacfbacec253305e1a715c387.tar.xz
ceph-d1b6cadd6c1514aeacfbacec253305e1a715c387.zip
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 <pdonnell@redhat.com>
Diffstat (limited to 'src/mds/SimpleLock.h')
-rw-r--r--src/mds/SimpleLock.h7
1 files changed, 3 insertions, 4 deletions
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<mds_rank_t,unsigned>::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();