diff options
Diffstat (limited to 'module/zcommon')
-rw-r--r-- | module/zcommon/zfeature_common.c | 6 | ||||
-rw-r--r-- | module/zcommon/zfs_comutil.c | 7 | ||||
-rw-r--r-- | module/zcommon/zfs_deleg.c | 5 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher_aarch64_neon.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher_avx512.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher_intel.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher_sse.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher_superscalar.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_fletcher_superscalar4.c | 2 | ||||
-rw-r--r-- | module/zcommon/zfs_namecheck.c | 6 | ||||
-rw-r--r-- | module/zcommon/zfs_prop.c | 6 | ||||
-rw-r--r-- | module/zcommon/zfs_uio.c | 2 | ||||
-rw-r--r-- | module/zcommon/zpool_prop.c | 6 | ||||
-rw-r--r-- | module/zcommon/zprop_common.c | 7 |
15 files changed, 25 insertions, 34 deletions
diff --git a/module/zcommon/zfeature_common.c b/module/zcommon/zfeature_common.c index 6ab3abe11..ea1bccf50 100644 --- a/module/zcommon/zfeature_common.c +++ b/module/zcommon/zfeature_common.c @@ -26,9 +26,7 @@ * Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved. */ -#ifdef _KERNEL -#include <sys/systm.h> -#else +#ifndef _KERNEL #include <errno.h> #include <string.h> #endif @@ -351,7 +349,7 @@ zpool_feature_init(void) } } -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) EXPORT_SYMBOL(zfeature_lookup_name); EXPORT_SYMBOL(zfeature_is_supported); EXPORT_SYMBOL(zfeature_is_valid_guid); diff --git a/module/zcommon/zfs_comutil.c b/module/zcommon/zfs_comutil.c index 685a20c44..b31e0ab27 100644 --- a/module/zcommon/zfs_comutil.c +++ b/module/zcommon/zfs_comutil.c @@ -29,15 +29,12 @@ * then a separate file should to be created. */ -#if defined(_KERNEL) -#include <sys/systm.h> -#else +#if !defined(_KERNEL) #include <string.h> #endif #include <sys/types.h> #include <sys/fs/zfs.h> -#include <sys/int_limits.h> #include <sys/nvpair.h> #include "zfs_comutil.h" #include <sys/zfs_ratelimit.h> @@ -207,7 +204,7 @@ const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS] = { "pool split", }; -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) EXPORT_SYMBOL(zfs_allocatable_devs); EXPORT_SYMBOL(zpool_get_rewind_policy); EXPORT_SYMBOL(zfs_zpl_version_map); diff --git a/module/zcommon/zfs_deleg.c b/module/zcommon/zfs_deleg.c index c6ba278cf..8d98f720a 100644 --- a/module/zcommon/zfs_deleg.c +++ b/module/zcommon/zfs_deleg.c @@ -28,16 +28,15 @@ #include <sys/zfs_context.h> #if defined(_KERNEL) -#include <sys/systm.h> #include <sys/sunddi.h> #include <sys/ctype.h> #else #include <stdio.h> #include <unistd.h> -#include <strings.h> #include <libnvpair.h> #include <ctype.h> #endif +#include <sys/strings.h> #include <sys/dsl_deleg.h> #include "zfs_prop.h" #include "zfs_deleg.h" @@ -244,7 +243,7 @@ zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type, } } -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) EXPORT_SYMBOL(zfs_deleg_verify_nvlist); EXPORT_SYMBOL(zfs_deleg_whokey); EXPORT_SYMBOL(zfs_deleg_canonicalize_perm); diff --git a/module/zcommon/zfs_fletcher.c b/module/zcommon/zfs_fletcher.c index 0cd992979..5a991ba60 100644 --- a/module/zcommon/zfs_fletcher.c +++ b/module/zcommon/zfs_fletcher.c @@ -867,7 +867,7 @@ zio_abd_checksum_func_t fletcher_4_abd_ops = { }; -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) #include <linux/mod_compat.h> static int diff --git a/module/zcommon/zfs_fletcher_aarch64_neon.c b/module/zcommon/zfs_fletcher_aarch64_neon.c index b72c1bafd..bd2db2b20 100644 --- a/module/zcommon/zfs_fletcher_aarch64_neon.c +++ b/module/zcommon/zfs_fletcher_aarch64_neon.c @@ -45,8 +45,8 @@ #include <linux/simd_aarch64.h> #include <sys/spa_checksum.h> +#include <sys/strings.h> #include <zfs_fletcher.h> -#include <strings.h> static void fletcher_4_aarch64_neon_init(fletcher_4_ctx_t *ctx) diff --git a/module/zcommon/zfs_fletcher_avx512.c b/module/zcommon/zfs_fletcher_avx512.c index ed93c1159..7260a9864 100644 --- a/module/zcommon/zfs_fletcher_avx512.c +++ b/module/zcommon/zfs_fletcher_avx512.c @@ -28,8 +28,8 @@ #include <sys/byteorder.h> #include <sys/frame.h> #include <sys/spa_checksum.h> +#include <sys/strings.h> #include <zfs_fletcher.h> -#include <strings.h> #define __asm __asm__ __volatile__ diff --git a/module/zcommon/zfs_fletcher_intel.c b/module/zcommon/zfs_fletcher_intel.c index a479b9d56..6dac047da 100644 --- a/module/zcommon/zfs_fletcher_intel.c +++ b/module/zcommon/zfs_fletcher_intel.c @@ -44,8 +44,8 @@ #include <linux/simd_x86.h> #include <sys/spa_checksum.h> +#include <sys/strings.h> #include <zfs_fletcher.h> -#include <strings.h> static void fletcher_4_avx2_init(fletcher_4_ctx_t *ctx) diff --git a/module/zcommon/zfs_fletcher_sse.c b/module/zcommon/zfs_fletcher_sse.c index 90b7d7d4e..a0b42e5f5 100644 --- a/module/zcommon/zfs_fletcher_sse.c +++ b/module/zcommon/zfs_fletcher_sse.c @@ -46,8 +46,8 @@ #include <linux/simd_x86.h> #include <sys/spa_checksum.h> #include <sys/byteorder.h> +#include <sys/strings.h> #include <zfs_fletcher.h> -#include <strings.h> static void fletcher_4_sse2_init(fletcher_4_ctx_t *ctx) diff --git a/module/zcommon/zfs_fletcher_superscalar.c b/module/zcommon/zfs_fletcher_superscalar.c index 02c5d53c7..fbbbf8060 100644 --- a/module/zcommon/zfs_fletcher_superscalar.c +++ b/module/zcommon/zfs_fletcher_superscalar.c @@ -43,8 +43,8 @@ #include <sys/byteorder.h> #include <sys/spa_checksum.h> +#include <sys/strings.h> #include <zfs_fletcher.h> -#include <strings.h> static void fletcher_4_superscalar_init(fletcher_4_ctx_t *ctx) diff --git a/module/zcommon/zfs_fletcher_superscalar4.c b/module/zcommon/zfs_fletcher_superscalar4.c index 4fd37d91c..97fdb7b7d 100644 --- a/module/zcommon/zfs_fletcher_superscalar4.c +++ b/module/zcommon/zfs_fletcher_superscalar4.c @@ -43,8 +43,8 @@ #include <sys/byteorder.h> #include <sys/spa_checksum.h> +#include <sys/strings.h> #include <zfs_fletcher.h> -#include <strings.h> static void fletcher_4_superscalar4_init(fletcher_4_ctx_t *ctx) diff --git a/module/zcommon/zfs_namecheck.c b/module/zcommon/zfs_namecheck.c index 42a7c6c93..aefde9087 100644 --- a/module/zcommon/zfs_namecheck.c +++ b/module/zcommon/zfs_namecheck.c @@ -38,9 +38,7 @@ * Each function returns 0 on success, -1 on error. */ -#if defined(_KERNEL) -#include <sys/systm.h> -#else +#if !defined(_KERNEL) #include <string.h> #endif @@ -349,7 +347,7 @@ pool_namecheck(const char *pool, namecheck_err_t *why, char *what) return (0); } -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) EXPORT_SYMBOL(pool_namecheck); EXPORT_SYMBOL(dataset_namecheck); EXPORT_SYMBOL(zfs_component_namecheck); diff --git a/module/zcommon/zfs_prop.c b/module/zcommon/zfs_prop.c index 34b7228ec..698fb8e21 100644 --- a/module/zcommon/zfs_prop.c +++ b/module/zcommon/zfs_prop.c @@ -39,9 +39,7 @@ #include "zfs_deleg.h" #include "zfs_fletcher.h" -#if defined(_KERNEL) -#include <sys/systm.h> -#else +#if !defined(_KERNEL) #include <stdlib.h> #include <string.h> #include <ctype.h> @@ -847,7 +845,7 @@ zfs_prop_align_right(zfs_prop_t prop) #endif -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) static int __init zcommon_init(void) { diff --git a/module/zcommon/zfs_uio.c b/module/zcommon/zfs_uio.c index 7b4175bbe..af9716126 100644 --- a/module/zcommon/zfs_uio.c +++ b/module/zcommon/zfs_uio.c @@ -49,6 +49,8 @@ #include <sys/types.h> #include <sys/uio_impl.h> +#include <sys/sysmacros.h> +#include <sys/strings.h> #include <linux/kmap_compat.h> /* diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c index fd21f3117..bc38eca7d 100644 --- a/module/zcommon/zpool_prop.c +++ b/module/zcommon/zpool_prop.c @@ -32,9 +32,7 @@ #include "zfs_prop.h" -#if defined(_KERNEL) -#include <sys/systm.h> -#else +#if !defined(_KERNEL) #include <stdlib.h> #include <string.h> #include <ctype.h> @@ -244,7 +242,7 @@ zpool_prop_align_right(zpool_prop_t prop) } #endif -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) /* zpool property functions */ EXPORT_SYMBOL(zpool_prop_init); EXPORT_SYMBOL(zpool_prop_get_type); diff --git a/module/zcommon/zprop_common.c b/module/zcommon/zprop_common.c index a4528d248..838988a4c 100644 --- a/module/zcommon/zprop_common.c +++ b/module/zcommon/zprop_common.c @@ -41,8 +41,9 @@ #include "zfs_deleg.h" #if defined(_KERNEL) -#include <sys/systm.h> -#include <util/qsort.h> +#include <linux/sort.h> +#define qsort(base, num, size, cmp) \ + sort(base, num, size, cmp, NULL) #else #include <stdlib.h> #include <string.h> @@ -435,7 +436,7 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type) #endif -#if defined(_KERNEL) && defined(HAVE_SPL) +#if defined(_KERNEL) /* Common routines to initialize property tables */ EXPORT_SYMBOL(zprop_register_impl); EXPORT_SYMBOL(zprop_register_string); |