From 6ee35af1a42cefa38e0d8dbdae2aa237a502e738 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski Date: Thu, 22 Jun 2023 13:19:16 +0000 Subject: [PATCH] zil: Drop an unnecessary if statement We already check for error != 0 earlier and return if true. The compiler error here is a false positive. --- module/zfs/zil.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/module/zfs/zil.c b/module/zfs/zil.c index a64aeb8732..39296c86d5 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -1922,9 +1922,7 @@ zil_lwb_write_issue(zilog_t *zilog, lwb_t *lwb) zilog->zl_prev_rotor = (zilog->zl_prev_rotor + 1) & (ZIL_PREV_BLKS - 1); BP_ZERO(bp); - if (error == 0) - error = zio_alloc_zil(spa, zilog->zl_os, txg, bp, zil_blksz, - &slog); + error = zio_alloc_zil(spa, zilog->zl_os, txg, bp, zil_blksz, &slog); if (slog) { ZIL_STAT_BUMP(zil_itx_metaslab_slog_count); ZIL_STAT_INCR(zil_itx_metaslab_slog_bytes, lwb->lwb_nused);