diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-05-27 16:17:43 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-05-31 15:44:04 +0300 |
commit | 601eb41183a6c2a646ce221da675f157181fd57b (patch) | |
tree | 1135551da457c8dbb1d1e38ee0d16b733952c1b7 | |
parent | 5bd517259f2bb3e48cd3dab5fa64ce2cf9b623df (diff) | |
download | mariadb-git-601eb41183a6c2a646ce221da675f157181fd57b.tar.gz |
Cleanup: deduplicate code
-rw-r--r-- | storage/innobase/buf/buf0flu.cc | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index fb3a9687cfc..7d1136043b7 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -2361,14 +2361,8 @@ void buf_flush_sync() { const ulint n_flushed= buf_flush_lists(srv_max_io_capacity, LSN_MAX); buf_flush_wait_batch_end_acquiring_mutex(false); - if (!n_flushed) - { - mysql_mutex_lock(&buf_pool.flush_list_mutex); - const auto len= UT_LIST_GET_LEN(buf_pool.flush_list); - mysql_mutex_unlock(&buf_pool.flush_list_mutex); - if (!len) - return; - } + if (!n_flushed && !buf_flush_list_length()) + return; } } |