Commit d3a813fd authored by marko's avatar marko

branches/zip: buf_page_get_gen(): After allocating an uncompressed page for

decompression, check that the compressed block has not been
buffer-fixed or I/O-fixed.  This race condition was introduced in r1286.
parent 74540484
......@@ -1774,7 +1774,7 @@ buf_page_get_gen(
if (bpage->buf_fix_count
|| buf_page_get_io_fix(bpage) != BUF_IO_NONE) {
wait_until_unfixed:
/* The block is buffer-fixed or I/O-fixed.
Try again later. */
mutex_exit(&buf_pool->mutex);
......@@ -1809,6 +1809,20 @@ buf_page_get_gen(
}
}
if (UNIV_UNLIKELY
(bpage->buf_fix_count
|| buf_page_get_io_fix(bpage) != BUF_IO_NONE)) {
/* The block was buffer-fixed or I/O-fixed
while buf_pool->mutex was released. Free the
block that was allocated and try again. */
buf_LRU_block_free_non_file_page(block);
mutex_exit(&block->mutex);
goto wait_until_unfixed;
}
/* Move the compressed page from bpage to block,
and uncompress it. */
......
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