The ZFS destroy checks the reference count on the dataset with zfs_refcount_count(&ds->ds_longholds) != expected_holds and returns EBUSY in dsl_destroy_head_check_impl.
The ZFS destroy checks the reference count on the dataset with zfs_refcount_ count(& ds->ds_ longholds) != expected_holds and returns EBUSY in dsl_destroy_ head_check_ impl.