changeset 4967:8d0de61ff354

6597381 BAD TRAP: type=e (#pf Page fault) rp=ffffff00043a48f0 addr=28 occurred in module "<unknown>" due to
author perrin
date Thu, 30 Aug 2007 15:15:28 -0700
parents 7d66b7569cb6
children e19af3ad3eea
files usr/src/uts/common/fs/zfs/dsl_dataset.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c	Thu Aug 30 12:27:42 2007 -0700
+++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c	Thu Aug 30 15:15:28 2007 -0700
@@ -962,8 +962,14 @@
 
 	dmu_buf_will_dirty(ds->ds_dbuf, tx);
 
-	/* Before the roll back destroy the zil */
-	zil_rollback_destroy(((objset_impl_t *)ds->ds_user_ptr)->os_zil, tx);
+	/*
+	 * Before the roll back destroy the zil.
+	 * Note, ds_user_ptr can be null if we are doing a "zfs receive -F"
+	 */
+	if (ds->ds_user_ptr != NULL) {
+		zil_rollback_destroy(
+		    ((objset_impl_t *)ds->ds_user_ptr)->os_zil, tx);
+	}
 
 	/* Zero out the deadlist. */
 	bplist_close(&ds->ds_deadlist);