mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
branches/zip: buf_page_io_query(): Shorten the code by using a local variable.
This commit is contained in:
parent
fdb017ff69
commit
87e42d059a
1 changed files with 4 additions and 7 deletions
|
@ -748,20 +748,17 @@ buf_page_io_query(
|
||||||
/* out: TRUE if io going on */
|
/* out: TRUE if io going on */
|
||||||
buf_page_t* bpage) /* in: buf_pool block, must be bufferfixed */
|
buf_page_t* bpage) /* in: buf_pool block, must be bufferfixed */
|
||||||
{
|
{
|
||||||
|
ibool io_fixed;
|
||||||
|
|
||||||
mutex_enter(&(buf_pool->mutex));
|
mutex_enter(&(buf_pool->mutex));
|
||||||
|
|
||||||
ut_ad(buf_page_in_file(bpage));
|
ut_ad(buf_page_in_file(bpage));
|
||||||
ut_ad(bpage->buf_fix_count > 0);
|
ut_ad(bpage->buf_fix_count > 0);
|
||||||
|
|
||||||
if (buf_page_get_io_fix(bpage) != BUF_IO_NONE) {
|
io_fixed = buf_page_get_io_fix(bpage) != BUF_IO_NONE;
|
||||||
mutex_exit(&(buf_pool->mutex));
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_exit(&(buf_pool->mutex));
|
mutex_exit(&(buf_pool->mutex));
|
||||||
|
|
||||||
return(FALSE);
|
return(io_fixed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
|
Loading…
Add table
Reference in a new issue