Commit c3599a3a authored by marko's avatar marko

branches/zip: buf_flush_remove(): buf_page_get_mutex(bpage) must have been

acquired by the caller.

buf_LRU_invalidate_tablespace(): Do not leak buf_pool->zip_mutex when
rescanning the LRU list.
parent 91546e7d
......@@ -227,6 +227,7 @@ buf_flush_remove(
{
#ifdef UNIV_SYNC_DEBUG
ut_a(mutex_own(&buf_pool->mutex));
ut_a(mutex_own(buf_page_get_mutex(bpage)));
#endif /* UNIV_SYNC_DEBUG */
ut_ad(bpage->in_flush_list);
......@@ -243,9 +244,7 @@ buf_flush_remove(
ut_error;
return;
case BUF_BLOCK_ZIP_DIRTY:
mutex_enter(&buf_pool->zip_mutex);
buf_page_set_state(bpage, BUF_BLOCK_ZIP_PAGE);
mutex_exit(&buf_pool->zip_mutex);
UT_LIST_REMOVE(list, buf_pool->flush_list, bpage);
buf_LRU_insert_zip_clean(bpage);
break;
......
......@@ -105,6 +105,7 @@ buf_LRU_invalidate_tablespace(
ut_a(buf_page_in_file(bpage));
mutex_enter(block_mutex);
next_zip:
prev_bpage = UT_LIST_GET_PREV(LRU, bpage);
if (buf_page_get_space(bpage) == id) {
......@@ -162,7 +163,7 @@ buf_LRU_invalidate_tablespace(
prev_bpage. Rescan the LRU list. */
bpage = UT_LIST_GET_LAST(buf_pool->LRU);
continue;
goto next_zip;
}
}
next_page:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment