```
How to reproduce:
# jail.conf
test {
path = "/jails/test";
exec.clean;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
# Make sure to unmount all ZFS datasets before stopping the jail
# Required unless the jails /etc/rc.d/zfs contains '# KEYWORD: shutdown'
exec.stop += "/usr/sbin/service zfs stop";
# Mandatory to use ZFS in jail
allow.mount;
allow.mount.zfs;
enforce_statfs = 1; # must be less than 2
# Attach ZFS dataset to jail
exec.created = "/sbin/zfs jail test tank/jaildata";
# Make sure the /dev/zfs device is included (it is with the default
# devfs_ruleset = 4)
mount.devfs;
}
# Create dataset
zfs create -o jailed=on -o mountpoint=/data tank/jaildata
mkdir -p /jails/test/data
sysrc -f /jails/test/etc/rc.conf zfs_enable=YES
# Start the jail
jail -c test
# List ZFS mounts
zfs mount | grep jaildata
tank/jaildata /jails/test/data
# Stop the jail
jail -r test
# List ZFS mounts (mount is still there)
zfs mount | grep jaildata
tank/jaildata /jails/test/data
```