]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
FreeBSD: Clean up zfsdev_close to match Linux
authorRyan Moeller <ryan@iXsystems.com>
Sat, 13 Mar 2021 00:09:15 +0000 (19:09 -0500)
committerMark Johnston <markj@FreeBSD.org>
Tue, 15 Mar 2022 18:09:52 +0000 (14:09 -0400)
commit0abaf7f630235933aca9dd5819d4c0aea9985f3a
tree87e6623006a14190b2eb0c54618bb03c0b499f2a
parent9dc74c5a4b3d10b20d14ada2db605d73af8a33f0
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
sys/contrib/openzfs/include/sys/zfs_ioctl.h
sys/contrib/openzfs/module/os/freebsd/zfs/kmod_core.c