aboutsummaryrefslogtreecommitdiff
path: root/emulators/open-vm-tools
diff options
context:
space:
mode:
authorJosh Paetzel <jpaetzel@FreeBSD.org>2020-01-11 16:32:46 +0000
committerJosh Paetzel <jpaetzel@FreeBSD.org>2020-01-11 16:32:46 +0000
commit1ed4644786538b1ddd64bdcfdb87ccb7570216e6 (patch)
tree08347f0f430b9cff8fd14dd66abe231a2b7779ed /emulators/open-vm-tools
parent801426181ac5e28d36a94385ad9c3e7edc0a1a69 (diff)
Notes
Diffstat (limited to 'emulators/open-vm-tools')
-rw-r--r--emulators/open-vm-tools/files/patch-modules_freebsd_shared_compat__vop.h14
-rw-r--r--emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vnops.c26
2 files changed, 40 insertions, 0 deletions
diff --git a/emulators/open-vm-tools/files/patch-modules_freebsd_shared_compat__vop.h b/emulators/open-vm-tools/files/patch-modules_freebsd_shared_compat__vop.h
new file mode 100644
index 000000000000..109937844e15
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-modules_freebsd_shared_compat__vop.h
@@ -0,0 +1,14 @@
+--- modules/freebsd/shared/compat_vop.h.orig 2019-10-21 21:58:04 UTC
++++ modules/freebsd/shared/compat_vop.h
+@@ -47,7 +47,11 @@
+ #if __FreeBSD_version >= 800011
+ #define COMPAT_THREAD_VAR(varname, varval)
+ #define COMPAT_VOP_LOCK(vop, flags, threadvar) VOP_LOCK((vop), (flags))
++#if __FreeBSD_version >= 1300074
++#define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop))
++#else
+ #define COMPAT_VOP_UNLOCK(vop, flags, threadvar) VOP_UNLOCK((vop), (flags))
++#endif
+ #define compat_lockstatus(lock, threadvar) lockstatus((lock))
+ #define compat_lockmgr(lock, flags, randompointerparam, threadval) lockmgr((lock), (flags), (randompointerparam))
+ #define compat_vn_lock(vp, flags, threadval) vn_lock((vp), (flags))
diff --git a/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vnops.c b/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vnops.c
new file mode 100644
index 000000000000..1e743a668858
--- /dev/null
+++ b/emulators/open-vm-tools/files/patch-modules_freebsd_vmblock_vnops.c
@@ -0,0 +1,26 @@
+--- modules/freebsd/vmblock/vnops.c.orig 2019-10-21 21:58:04 UTC
++++ modules/freebsd/vmblock/vnops.c
+@@ -1262,12 +1262,15 @@ struct vop_unlock_args {
+ */
+ {
+ struct vnode *vp = ap->a_vp;
++#if __FreeBSD_version < 1300074
+ int flags = ap->a_flags;
++#endif
+ COMPAT_THREAD_VAR(td, ap->a_td);
+ struct VMBlockNode *nn;
+ struct vnode *lvp;
+ int error;
+
++#if __FreeBSD_version < 1300074
+ /*
+ * If caller already holds interlock, drop it. (Per VOP_UNLOCK() API.)
+ * Also strip LK_INTERLOCK from flags passed to lower layer.
+@@ -1276,6 +1279,7 @@ struct vop_unlock_args {
+ VI_UNLOCK(vp);
+ ap->a_flags = flags &= ~LK_INTERLOCK;
+ }
++#endif
+ nn = VPTOVMB(vp);
+ if (nn != NULL && (lvp = VMBVPTOLOWERVP(vp)) != NULL) {
+ error = COMPAT_VOP_UNLOCK(lvp, flags, td);