Permalink
Browse files

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.

Signed-off-by: Tom Caputi <tcaputi@datto.com>
  • Loading branch information...
tcaputi committed Oct 11, 2018
1 parent acb4494 commit b0fcf4106122d6ea77cb136c2d2ff1218231d067
Showing with 2 additions and 1 deletion.
  1. +2 −1 module/zfs/zil.c
View
@@ -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);
}

0 comments on commit b0fcf41

Please sign in to comment.