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:
parent
eec942cc54
commit
63d4838b4a
|
@ -226,7 +226,11 @@ zfs_vop_fsync(vnode_t *vp)
|
||||||
struct mount *mp;
|
struct mount *mp;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
#if __FreeBSD_version < 1400068
|
||||||
if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)
|
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;
|
goto drop;
|
||||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||||
error = VOP_FSYNC(vp, MNT_WAIT, curthread);
|
error = VOP_FSYNC(vp, MNT_WAIT, curthread);
|
||||||
|
|
Loading…
Reference in New Issue