diff options
author | Tom Caputi <tcaputi@datto.com> | 2018-10-11 20:38:27 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2018-10-24 21:36:40 +0000 |
commit | c04812f964a2a79ec501fb1ba995ef333ff79172 (patch) | |
tree | e2f6b1a3d62dbfa564512eec183ed0bc84f7b564 | |
parent | 9410257800789cde96abf135663930d0f44661e6 (diff) | |
download | src-c04812f964a2a79ec501fb1ba995ef333ff79172.tar.gz src-c04812f964a2a79ec501fb1ba995ef333ff79172.zip |
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 <behlendorf1@llnl.gov>
Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8010
-rw-r--r-- | module/zfs/zil.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/zil.c b/module/zfs/zil.c index e247c1e4f1be..d5ebf7561f1b 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); } |