From 6b42ea85903b5d96eddbe364e71636e6802d8da0 Mon Sep 17 00:00:00 2001 From: Paul Dagnelie Date: Fri, 5 Feb 2016 13:47:48 -0800 Subject: [PATCH] Illumos 5809 - Blowaway full receive in v1 pool causes kernel panic 5809 Blowaway full receive in v1 pool causes kernel panic Reviewed by: Matthew Ahrens Reviewed by: Alex Reece Reviewed by: Will Andrews Approved by: Gordon Ross References: https://www.illumos.org/issues/5809 https://github.com/illumos/illumos-gate/commit/f40b29c Ported-by: Brian Behlendorf --- module/zfs/dmu_send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index 88d27c867..6585e4778 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -1350,7 +1350,8 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t *tx) } dsobj = dsl_dataset_create_sync(ds->ds_dir, recv_clone_name, snap, crflags, drba->drba_cred, tx); - dsl_dataset_rele(snap, FTAG); + if (drba->drba_snapobj != 0) + dsl_dataset_rele(snap, FTAG); dsl_dataset_rele(ds, FTAG); } else { dsl_dir_t *dd;