]> git.proxmox.com Git - mirror_zfs.git/commit
freebsd: return EISDIR for read(2) on directories
authorKyle Evans <kevans91@users.noreply.github.com>
Sat, 16 May 2020 17:12:01 +0000 (12:12 -0500)
committerGitHub <noreply@github.com>
Sat, 16 May 2020 17:12:01 +0000 (10:12 -0700)
commit5b090d57d4da09a3372b9566c46dfc51a13433c6
tree3305b5c42cf2a3dd562bdebcfac74ad1a06571e6
parentd2782af461c62350abb5abe439b57961c72f9cee
freebsd: return EISDIR for read(2) on directories

This is arguably a change for internal consistency within OpenZFS, as the
Linux implementation will reject read(2) on directories with EISDIR. It's
not unreasonable for read(2) to do something here on FreeBSD, but we don't
currently copy out anything useful anyways so start rejecting it with the
appropriate error.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Closes #10338
module/os/freebsd/zfs/zfs_vnops.c