#include <sys/zfeature.h>
#include <linux/miscdevice.h>
+#include <linux/module_compat.h>
#include "zfs_namecheck.h"
#include "zfs_prop.h"
{
const char *newfile;
size_t size = 4096;
- char *buf = kmem_alloc(size, KM_PUSHPAGE);
+ char *buf = kmem_alloc(size, KM_SLEEP);
char *nl;
va_list adx;
if (zc->zc_history == 0)
return (NULL);
- buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP | KM_NODEBUG);
+ buf = kmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP);
if (copyinstr((void *)(uintptr_t)zc->zc_history,
buf, HIS_MAX_RECORD_LEN, NULL) != 0) {
history_str_free(buf);
if (size == 0)
return (SET_ERROR(EINVAL));
- packed = kmem_alloc(size, KM_SLEEP | KM_NODEBUG);
+ 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);
if (err == 0 && intval >= ZPL_VERSION_USERSPACE) {
zfs_cmd_t *zc;
- zc = kmem_zalloc(sizeof (zfs_cmd_t),
- KM_SLEEP | KM_NODEBUG);
+ zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
(void) strcpy(zc->zc_name, dsname);
(void) zfs_ioc_userspace_upgrade(zc);
kmem_free(zc, sizeof (zfs_cmd_t));
VERIFY(nvlist_alloc(&errors, NV_UNIQUE_NAME, KM_SLEEP) == 0);
- zc = kmem_alloc(sizeof (zfs_cmd_t), KM_SLEEP | KM_NODEBUG);
+ zc = kmem_alloc(sizeof (zfs_cmd_t), KM_SLEEP);
(void) strcpy(zc->zc_name, dataset);
pair = nvlist_next_nvpair(props, NULL);
while (pair != NULL) {
if (vec->zvec_func == NULL && vec->zvec_legacy_func == NULL)
return (-SET_ERROR(EINVAL));
- zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP | KM_NODEBUG);
+ zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
error = ddi_copyin((void *)arg, zc, sizeof (zfs_cmd_t), flag);
if (error != 0) {
}
}
- VERIFY0(nvlist_alloc(&outnvl, NV_UNIQUE_NAME, KM_PUSHPAGE));
+ outnvl = fnvlist_alloc();
error = vec->zvec_func(zc->zc_name, innvl, outnvl);
if (error == 0 && vec->zvec_allow_log &&