HomeFreeBSD

FreeBSD: Clean up zfsdev_close to match Linux

Description

FreeBSD: Clean up zfsdev_close to match Linux

Resolve some oddities in zfsdev_close() which could result in a
panic and were not present in the equivalent function for Linux.

  • Remove unused definition ZFS_MIN_MINOR
  • FreeBSD: Simplify zfsdev state destruction
  • Assert zs_minor is valid in zfsdev_close
  • Make locking around zfsdev state match Linux

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11720

Approved by: so
Security: FreeBSD-EN-22:12.zfs

Details

Provenance
freqlabsAuthored on Mar 13 2021, 12:09 AM
markjCommitted on Mar 15 2022, 6:09 PM
Parents
rG9dc74c5a4b3d: Fix handling of errors from dmu_write_uio_dbuf() on FreeBSD
Branches
Unknown
Tags
Unknown