]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix ASSERT in zil_create() during ztest
authorTom Caputi <tcaputi@datto.com>
Thu, 11 Oct 2018 20:38:27 +0000 (16:38 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 24 Oct 2018 21:36:40 +0000 (14:36 -0700)
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

module/zfs/zil.c

index e247c1e4f1bee7d510fd86946283ba2ce4863940..d5ebf7561f1bb1c844dbd463d12c1eedfc91a97a 100644 (file)
@@ -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);
 }