From c2df3d30c065d962d4d40f94aca42b527f647bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 18 Aug 2022 17:12:00 +0300 Subject: MDEV-21452 fixup: Avoid an unnecessary mutex operation --- extra/mariabackup/xtrabackup.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 1dd52e6bce0..62a619587e3 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2477,11 +2477,11 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info) /* ================= backup ================= */ void xtrabackup_io_throttling() { - if (!xtrabackup_backup) + if (!xtrabackup_backup || !xtrabackup_throttle) return; mysql_mutex_lock(&log_sys.mutex); - if (xtrabackup_throttle && (io_ticket--) < 0) + if (io_ticket-- < 0) mysql_cond_wait(&wait_throttle, &log_sys.mutex); mysql_mutex_unlock(&log_sys.mutex); } -- cgit v1.2.1