From 63d4838b4ac5557510db70aff334ec7caa96114c Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 21 Sep 2022 00:22:32 +0200 Subject: [PATCH] FreeBSD: handle V_PCATCH See https://cgit.FreeBSD.org/src/commit/?id=a75d1ddd74312f5dd79bc1e965f7077679659f2e Reviewed-by: Ryan Moeller Reviewed-by: Alexander Motin Signed-off-by: Mateusz Guzik Closes #13910 --- module/os/freebsd/zfs/zfs_file_os.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/os/freebsd/zfs/zfs_file_os.c b/module/os/freebsd/zfs/zfs_file_os.c index fd86a75416..60c9ff0581 100644 --- a/module/os/freebsd/zfs/zfs_file_os.c +++ b/module/os/freebsd/zfs/zfs_file_os.c @@ -226,7 +226,11 @@ zfs_vop_fsync(vnode_t *vp) struct mount *mp; int error; +#if __FreeBSD_version < 1400068 if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) +#else + if ((error = vn_start_write(vp, &mp, V_WAIT | V_PCATCH)) != 0) +#endif goto drop; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(vp, MNT_WAIT, curthread);