As we need to update the blocker below, then we need to use reference to front object,
rather than a new object of blocker.
Fixes: http://tracker.ceph.com/issues/36475
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
// check the m_blockers from head to tail, if blocker can get
// enough tokens, let it go.
while (!m_blockers.empty()) {
- Blocker blocker = m_blockers.front();
+ Blocker &blocker = m_blockers.front();
uint64_t got = m_throttle.get(blocker.tokens_requested);
if (got == blocker.tokens_requested) {
// got enough tokens for front.