From 94e49a71b2493c519c25ae897337f0d3f72aec55 Mon Sep 17 00:00:00 2001 From: marko Date: Tue, 16 Jan 2007 16:39:53 +0000 Subject: [PATCH] branches/zip: Note that b (the newly created control block for the compressed page) is not protected by block_mutex. Before releasing buf_pool->mutex, we can simply assign b->io_fix. After reacquiring buf_pool->mutex, we also have to acquire buf_pool->zip_mutex. --- buf/buf0lru.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buf/buf0lru.c b/buf/buf0lru.c index 00500cec2ab..312bd997322 100644 --- a/buf/buf0lru.c +++ b/buf/buf0lru.c @@ -998,7 +998,7 @@ buf_LRU_free_block( decompressing the block while we release buf_pool->mutex and block_mutex. */ b->buf_fix_count++; - buf_page_set_io_fix(b, BUF_IO_READ); + b->io_fix = BUF_IO_READ; } mutex_exit(&buf_pool->mutex); @@ -1037,8 +1037,10 @@ buf_LRU_free_block( mutex_enter(block_mutex); if (b) { + mutex_enter(&buf_pool->zip_mutex); b->buf_fix_count--; buf_page_set_io_fix(b, BUF_IO_NONE); + mutex_exit(&buf_pool->zip_mutex); } buf_LRU_block_free_hashed_page((buf_block_t*) bpage);