aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2019-01-10 11:03:40 -0800
committerBrian Behlendorf <[email protected]>2019-01-28 10:11:10 -0800
commit77e50c3070a0009c4ed8b50dbb7cf0df48bdda90 (patch)
tree5dd8d9a703f9ae1392985eb9f363965d27e5c0af /include
parent5cb46f6a664db913f0ef2bf8e929c3f8d8cbfc5b (diff)
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 <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #8261
Diffstat (limited to 'include')
-rw-r--r--include/linux/kmap_compat.h8
1 files changed, 8 insertions, 0 deletions
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 <linux/highmem.h>
+#include <linux/uaccess.h>
#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 */