]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/nvpair/nvpair_alloc_fixed.c
Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT
[mirror_zfs.git] / module / nvpair / nvpair_alloc_fixed.c
index 33e3c0d00705ee432e8f95f005d8552185c95126..0d4e12b972bb88788658850db001bef91e725854 100644 (file)
@@ -42,7 +42,7 @@
  *  - it uses a pre-allocated buffer for memory allocations.
  *  - it does _not_ free memory in the pre-allocated buffer.
  *
- * The reason for the selected implemention is simplicity.
+ * The reason for the selected implementation is simplicity.
  * This allocator is designed for the usage in interrupt context when
  * the caller may not wait for free memory.
  */
@@ -110,11 +110,15 @@ nv_fixed_reset(nv_alloc_t *nva)
 }
 
 const nv_alloc_ops_t nv_fixed_ops_def = {
-       nv_fixed_init,  /* nv_ao_init() */
-       NULL,           /* nv_ao_fini() */
-       nv_fixed_alloc, /* nv_ao_alloc() */
-       nv_fixed_free,  /* nv_ao_free() */
-       nv_fixed_reset  /* nv_ao_reset() */
+       .nv_ao_init = nv_fixed_init,
+       .nv_ao_fini = NULL,
+       .nv_ao_alloc = nv_fixed_alloc,
+       .nv_ao_free = nv_fixed_free,
+       .nv_ao_reset = nv_fixed_reset
 };
 
 const nv_alloc_ops_t *nv_fixed_ops = &nv_fixed_ops_def;
+
+#if defined(_KERNEL) && defined(HAVE_SPL)
+EXPORT_SYMBOL(nv_fixed_ops);
+#endif