Merge pull request #28748 from trociny/wip-journal-player-handle_cache_rebalanced

journal: fix race between player shut down and cache rebalance

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2019-06-27 13:37:34 -04:00 committed by GitHub
commit e1c25b8596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -836,7 +836,7 @@ void JournalPlayer::notify_complete(int r) {
void JournalPlayer::handle_cache_rebalanced(uint64_t new_cache_bytes) {
Mutex::Locker locker(m_lock);
if (m_state == STATE_ERROR) {
if (m_state == STATE_ERROR || m_shut_down) {
return;
}