diff options
Diffstat (limited to 'storage/innobase/buf/buf0rea.cc')
-rw-r--r-- | storage/innobase/buf/buf0rea.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/storage/innobase/buf/buf0rea.cc b/storage/innobase/buf/buf0rea.cc index 3b49525502a..a23d9a24aae 100644 --- a/storage/innobase/buf/buf0rea.cc +++ b/storage/innobase/buf/buf0rea.cc @@ -108,15 +108,9 @@ static buf_page_t* buf_page_init_for_read(ulint mode, const page_id_t page_id, { block= buf_LRU_get_free_block(false); block->initialise(page_id, zip_size); - /* We set a pass-type x-lock on the frame because then - the same thread which called for the read operation - (and is running now at this point of code) can wait - for the read to complete by waiting for the x-lock on - the frame; if the x-lock were recursive, the same - thread would illegally get the x-lock before the page - read is completed. The x-lock will be released + /* x_unlock() will be invoked in buf_page_read_complete() by the io-handler thread. */ - rw_lock_x_lock_gen(&block->lock, BUF_IO_READ); + block->lock.x_lock(true); } const ulint fold= page_id.fold(); @@ -135,7 +129,7 @@ static buf_page_t* buf_page_init_for_read(ulint mode, const page_id_t page_id, hash_lock->write_unlock(); if (block) { - rw_lock_x_unlock_gen(&block->lock, BUF_IO_READ); + block->lock.x_unlock(true); buf_LRU_block_free_non_file_page(block); } goto func_exit; |