Commit 2bb0307b authored by marko's avatar marko

branches/zip: buf_page_get_zip(): Eliminate a buf_page_get_mutex() call.

The function must switch on the block state anyway.
parent 484de489
...@@ -1676,9 +1676,6 @@ lookup: ...@@ -1676,9 +1676,6 @@ lookup:
return(NULL); return(NULL);
} }
block_mutex = buf_page_get_mutex(bpage);
mutex_enter(block_mutex);
switch (buf_page_get_state(bpage)) { switch (buf_page_get_state(bpage)) {
case BUF_BLOCK_NOT_USED: case BUF_BLOCK_NOT_USED:
case BUF_BLOCK_READY_FOR_USE: case BUF_BLOCK_READY_FOR_USE:
...@@ -1689,9 +1686,14 @@ lookup: ...@@ -1689,9 +1686,14 @@ lookup:
break; break;
case BUF_BLOCK_ZIP_PAGE: case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY: case BUF_BLOCK_ZIP_DIRTY:
block_mutex = &buf_pool_zip_mutex;
mutex_enter(block_mutex);
bpage->buf_fix_count++; bpage->buf_fix_count++;
break; break;
case BUF_BLOCK_FILE_PAGE: case BUF_BLOCK_FILE_PAGE:
block_mutex = &((buf_block_t*) bpage)->mutex;
mutex_enter(block_mutex);
/* Discard the uncompressed page frame if possible. */ /* Discard the uncompressed page frame if possible. */
if (buf_LRU_free_block(bpage, FALSE, NULL) if (buf_LRU_free_block(bpage, FALSE, NULL)
== BUF_LRU_FREED) { == BUF_LRU_FREED) {
......
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