+ /*
+ * A private SA handle must be used to ensure we can drop the hold
+ * on the spill block prior to calling dmu_tx_commit(). If we call
+ * dmu_tx_commit() before sa_handle_destroy(), then our hold will
+ * trigger a copy of the buffer at txg sync time. This is done to
+ * prevent data from leaking in to the syncing txg. As a result
+ * the original dirty spill block will be remain dirty in the arc
+ * while the copy is written and laundered.
+ */
+ error = sa_handle_get(zsb->z_os, zp->z_id, NULL, SA_HDL_PRIVATE, &sa);
+ if (error)
+ goto out_free;
+