summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-10-11 16:38:27 -0400
committerBrian Behlendorf <[email protected]>2018-10-24 14:36:40 -0700
commitc04812f964a2a79ec501fb1ba995ef333ff79172 (patch)
treee2f6b1a3d62dbfa564512eec183ed0bc84f7b564
parent9410257800789cde96abf135663930d0f44661e6 (diff)
Fix ASSERT in zil_create() during ztest
This patch corrects an ASSERT in zil_create() that will only be true if the call to zio_alloc_zil() does not fail. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Reviewed-by: Matthew Ahrens <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #8010
-rw-r--r--module/zfs/zil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/zil.c b/module/zfs/zil.c
index e247c1e4f..d5ebf7561 100644
--- a/module/zfs/zil.c
+++ b/module/zfs/zil.c
@@ -720,7 +720,8 @@ zil_create(zilog_t *zilog)
txg_wait_synced(zilog->zl_dmu_pool, txg);
}
- ASSERT(bcmp(&blk, &zh->zh_log, sizeof (blk)) == 0);
+ ASSERT(error != 0 || bcmp(&blk, &zh->zh_log, sizeof (blk)) == 0);
+ IMPLY(error == 0, lwb != NULL);
return (lwb);
}