HomeFreeBSD

freebsd: return EISDIR for read(2) on directories

Description

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

Details

Provenance
kevansAuthored on May 16 2020, 5:12 PM
GitHub <noreply@github.com>Committed on May 16 2020, 5:12 PM
Parents
rGd2782af461c6: Fix ZVOL_DIR
Branches
Unknown
Tags
Unknown