From 2587cd8f93ec2ec774e49aafbf536b918f77cff2 Mon Sep 17 00:00:00 2001 From: Marcel Huber Date: Wed, 11 May 2016 21:23:42 +0200 Subject: [PATCH] Fixes subtle bug in zio_handle_io_delay() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixed bug introduced in commit #c35b1882. Hinted by gcc: zio_inject.c: In function ‘zio_handle_io_delay’: zio_inject.c:382:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (handler->zi_record.zi_freq != 0 && ^~ zio_inject.c:384:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’ continue; ^~~~~~~~ Signed-off-by: Marcel Huber Signed-off-by: Chunwei Chen Signed-off-by: Brian Behlendorf Closes #4632 --- module/zfs/zio_inject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index a6eca8715..1458be477 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -380,8 +380,9 @@ zio_handle_io_delay(zio_t *zio) continue; if (handler->zi_record.zi_freq != 0 && - spa_get_random(100) >= handler->zi_record.zi_freq); + spa_get_random(100) >= handler->zi_record.zi_freq) { continue; + } if (vd->vdev_guid == handler->zi_record.zi_guid) { seconds = handler->zi_record.zi_timer; -- 2.40.0