From 77e50c3070a0009c4ed8b50dbb7cf0df48bdda90 Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Thu, 10 Jan 2019 11:03:40 -0800 Subject: Linux 5.0 compat: access_ok() drops 'type' parameter access_ok no longer needs a 'type' parameter in the 5.0 kernel. Reviewed-by: Brian Behlendorf Signed-off-by: Tony Hutter Closes #8261 --- include/linux/kmap_compat.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/linux/kmap_compat.h b/include/linux/kmap_compat.h index 59ae566ce..b9c7f5bcc 100644 --- a/include/linux/kmap_compat.h +++ b/include/linux/kmap_compat.h @@ -27,6 +27,7 @@ #define _ZFS_KMAP_H #include +#include #ifdef HAVE_1ARG_KMAP_ATOMIC /* 2.6.37 API change */ @@ -37,4 +38,11 @@ #define zfs_kunmap_atomic(addr, km_type) kunmap_atomic(addr, km_type) #endif +/* 5.0 API change - no more 'type' argument for access_ok() */ +#ifdef HAVE_ACCESS_OK_TYPE +#define zfs_access_ok(type, addr, size) access_ok(type, addr, size) +#else +#define zfs_access_ok(type, addr, size) access_ok(addr, size) +#endif + #endif /* _ZFS_KMAP_H */ -- cgit v1.2.3