aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
Diffstat (limited to 'module')
-rw-r--r--module/os/freebsd/spl/spl_zlib.c8
-rw-r--r--module/os/freebsd/zfs/event_os.c18
-rw-r--r--module/os/freebsd/zfs/zfs_vnops_os.c4
3 files changed, 22 insertions, 8 deletions
diff --git a/module/os/freebsd/spl/spl_zlib.c b/module/os/freebsd/spl/spl_zlib.c
index 8bd3bdedf..42c6d7f9d 100644
--- a/module/os/freebsd/spl/spl_zlib.c
+++ b/module/os/freebsd/spl/spl_zlib.c
@@ -32,11 +32,7 @@ __FBSDID("$FreeBSD$");
#include <sys/kmem.h>
#include <sys/kmem_cache.h>
#include <sys/zmod.h>
-#if __FreeBSD_version >= 1300041
#include <contrib/zlib/zlib.h>
-#else
-#include <sys/zlib.h>
-#endif
#include <sys/kobj.h>
@@ -90,11 +86,7 @@ zlib_inflateInit(z_stream *stream)
static int
zlib_inflate(z_stream *stream, int finish)
{
-#if __FreeBSD_version >= 1300024
return (inflate(stream, finish));
-#else
- return (_zlib104_inflate(stream, finish));
-#endif
}
diff --git a/module/os/freebsd/zfs/event_os.c b/module/os/freebsd/zfs/event_os.c
index 239d44d0c..e774fbaaf 100644
--- a/module/os/freebsd/zfs/event_os.c
+++ b/module/os/freebsd/zfs/event_os.c
@@ -46,6 +46,7 @@ knlist_sx_xunlock(void *arg)
sx_xunlock((struct sx *)arg);
}
+#if __FreeBSD_version >= 1300128
static void
knlist_sx_assert_lock(void *arg, int what)
{
@@ -55,11 +56,28 @@ knlist_sx_assert_lock(void *arg, int what)
else
sx_assert((struct sx *)arg, SX_UNLOCKED);
}
+#else
+static void
+knlist_sx_assert_locked(void *arg)
+{
+ sx_assert((struct sx *)arg, SX_LOCKED);
+}
+static void
+knlist_sx_assert_unlocked(void *arg)
+{
+ sx_assert((struct sx *)arg, SX_UNLOCKED);
+}
+#endif
void
knlist_init_sx(struct knlist *knl, struct sx *lock)
{
+#if __FreeBSD_version >= 1300128
knlist_init(knl, lock, knlist_sx_xlock, knlist_sx_xunlock,
knlist_sx_assert_lock);
+#else
+ knlist_init(knl, lock, knlist_sx_xlock, knlist_sx_xunlock,
+ knlist_sx_assert_locked, knlist_sx_assert_unlocked);
+#endif
}
diff --git a/module/os/freebsd/zfs/zfs_vnops_os.c b/module/os/freebsd/zfs/zfs_vnops_os.c
index f672deed3..05f28033b 100644
--- a/module/os/freebsd/zfs/zfs_vnops_os.c
+++ b/module/os/freebsd/zfs/zfs_vnops_os.c
@@ -6213,6 +6213,7 @@ zfs_deallocate(struct vop_deallocate_args *ap)
}
#endif
+#if __FreeBSD_version >= 1300039
#ifndef _SYS_SYSPROTO_H_
struct vop_copy_file_range_args {
struct vnode *a_invp;
@@ -6319,6 +6320,7 @@ bad_write_fallback:
ap->a_incred, ap->a_outcred, ap->a_fsizetd);
return (error);
}
+#endif
struct vop_vector zfs_vnodeops;
struct vop_vector zfs_fifoops;
@@ -6383,7 +6385,9 @@ struct vop_vector zfs_vnodeops = {
#if __FreeBSD_version >= 1400043
.vop_add_writecount = vop_stdadd_writecount_nomsync,
#endif
+#if __FreeBSD_version >= 1300039
.vop_copy_file_range = zfs_freebsd_copy_file_range,
+#endif
};
VFS_VOP_VECTOR_REGISTER(zfs_vnodeops);