diff --git a/mysql-8.0.19/storage/innobase/buf/buf0flu.cc b/mysql-8.0.19/storage/innobase/buf/buf0flu.cc index f0fbaa9fd..c400b9543 100644 --- a/mysql-8.0.19/storage/innobase/buf/buf0flu.cc +++ b/mysql-8.0.19/storage/innobase/buf/buf0flu.cc @@ -1892,16 +1892,13 @@ static bool buf_flush_page_and_try_neighbors(buf_page_t *bpage, buf_pool = buf_pool_from_bpage(bpage); - if (flush_type == BUF_FLUSH_LRU) { - mutex_exit(&buf_pool->LRU_list_mutex); - } - const page_id_t page_id = bpage->id; if (flush_type == BUF_FLUSH_LRU) { + mutex_exit(&buf_pool->LRU_list_mutex); mutex_exit(block_mutex); } else { - buf_flush_list_mutex_exit(buf_pool); + buf_flush_list_mutex_exit(buf_pool); } /* Try to flush also all the neighbors */