aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/nvpair/nvpair_alloc_spl.c5
-rw-r--r--module/zfs/spa.c4
-rw-r--r--module/zfs/zfs_ioctl.c8
3 files changed, 9 insertions, 8 deletions
diff --git a/module/nvpair/nvpair_alloc_spl.c b/module/nvpair/nvpair_alloc_spl.c
index f9055b94f..bc377ab66 100644
--- a/module/nvpair/nvpair_alloc_spl.c
+++ b/module/nvpair/nvpair_alloc_spl.c
@@ -26,17 +26,18 @@
#include <sys/nvpair.h>
#include <sys/kmem.h>
+#include <sys/vmem.h>
static void *
nv_alloc_sleep_spl(nv_alloc_t *nva, size_t size)
{
- return (kmem_alloc(size, KM_SLEEP));
+ return (vmem_alloc(size, KM_SLEEP));
}
static void *
nv_alloc_pushpage_spl(nv_alloc_t *nva, size_t size)
{
- return (kmem_alloc(size, KM_PUSHPAGE));
+ return (vmem_alloc(size, KM_PUSHPAGE));
}
static void *
diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 55bcf43f8..861a319af 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@@ -1586,12 +1586,12 @@ load_nvlist(spa_t *spa, uint64_t obj, nvlist_t **value)
nvsize = *(uint64_t *)db->db_data;
dmu_buf_rele(db, FTAG);
- packed = kmem_alloc(nvsize, KM_SLEEP);
+ packed = vmem_alloc(nvsize, KM_SLEEP);
error = dmu_read(spa->spa_meta_objset, obj, 0, nvsize, packed,
DMU_READ_PREFETCH);
if (error == 0)
error = nvlist_unpack(packed, nvsize, value, 0);
- kmem_free(packed, nvsize);
+ vmem_free(packed, nvsize);
return (error);
}
diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
index 5b9c8f17b..171e08c7a 100644
--- a/module/zfs/zfs_ioctl.c
+++ b/module/zfs/zfs_ioctl.c
@@ -1328,20 +1328,20 @@ get_nvlist(uint64_t nvl, uint64_t size, int iflag, nvlist_t **nvp)
if (size == 0)
return (SET_ERROR(EINVAL));
- packed = kmem_alloc(size, KM_SLEEP);
+ packed = vmem_alloc(size, KM_SLEEP);
if ((error = ddi_copyin((void *)(uintptr_t)nvl, packed, size,
iflag)) != 0) {
- kmem_free(packed, size);
+ vmem_free(packed, size);
return (error);
}
if ((error = nvlist_unpack(packed, size, &list, 0)) != 0) {
- kmem_free(packed, size);
+ vmem_free(packed, size);
return (error);
}
- kmem_free(packed, size);
+ vmem_free(packed, size);
*nvp = list;
return (0);