FreeBSD: Lock vnode in zfs_ioctl()
commitb3b0ce64d50a948a3fab19d7cd4652b411ef200c
authorAlexander Motin <mav@FreeBSD.org>
Sat, 23 Nov 2024 22:26:52 +0000 (23 17:26 -0500)
committerGitHub <noreply@github.com>
Sat, 23 Nov 2024 22:26:52 +0000 (23 14:26 -0800)
tree200cfd978b9a62ea322be5b551f89e57bf0859f0
parent38c0324c0fb6b53286f00b7e36d1edca70d863d8
FreeBSD: Lock vnode in zfs_ioctl()

Previously vnode was not locked there, unlike Linux.  It required
locking it in vn_flush_cached_data(), which recursed on the lock
if called from zfs_clone_range(), having the vnode locked.

Reviewed-by: Alan Somers <asomers@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #16789
Closes #16796
include/os/freebsd/spl/sys/vnode.h
module/os/freebsd/zfs/zfs_vnops_os.c