This allows to ensure that we do not write to a file that was opened for reading only or vice versa. Also, use the correct capability in in zfs_ioc_send_new(). Differential Revision: https://reviews.freebsd.org/D2382 Reviewed by: delphij MFC after: 17 days Sponsored by: ClusterHQ