Skip to content

Commit c2df3d3

Browse files
committed
MDEV-21452 fixup: Avoid an unnecessary mutex operation
1 parent ec37906 commit c2df3d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extra/mariabackup/xtrabackup.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,11 +2477,11 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
24772477
/* ================= backup ================= */
24782478
void xtrabackup_io_throttling()
24792479
{
2480-
if (!xtrabackup_backup)
2480+
if (!xtrabackup_backup || !xtrabackup_throttle)
24812481
return;
24822482

24832483
mysql_mutex_lock(&log_sys.mutex);
2484-
if (xtrabackup_throttle && (io_ticket--) < 0)
2484+
if (io_ticket-- < 0)
24852485
mysql_cond_wait(&wait_throttle, &log_sys.mutex);
24862486
mysql_mutex_unlock(&log_sys.mutex);
24872487
}

0 commit comments

Comments
 (0)