FreeBSD: handle V_PCATCH

See https://cgit.FreeBSD.org/src/commit/?id=a75d1ddd74312f5dd79bc1e965f7077679659f2e

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Closes #13910
This commit is contained in:
Mateusz Guzik 2022-09-21 00:22:32 +02:00 committed by Tony Hutter
parent eec942cc54
commit 63d4838b4a
1 changed files with 4 additions and 0 deletions

View File

@ -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);