Merge branch 'linux-kernel-mem' into refs/top-bases/linux-zfs-branch
Conflicts: module/zfs/zfs_ioctl.c
This commit is contained in:
commit
979273cab1
|
@ -974,13 +974,13 @@ put_nvlist(zfs_cmd_t *zc, nvlist_t *nvl)
|
||||||
if (size > zc->zc_nvlist_dst_size) {
|
if (size > zc->zc_nvlist_dst_size) {
|
||||||
error = ENOMEM;
|
error = ENOMEM;
|
||||||
} else {
|
} else {
|
||||||
packed = vmem_alloc(size, KM_SLEEP);
|
packed = kmem_alloc(size, KM_SLEEP);
|
||||||
VERIFY(nvlist_pack(nvl, &packed, &size, NV_ENCODE_NATIVE,
|
VERIFY(nvlist_pack(nvl, &packed, &size, NV_ENCODE_NATIVE,
|
||||||
KM_SLEEP) == 0);
|
KM_SLEEP) == 0);
|
||||||
if (ddi_copyout(packed, (void *)(uintptr_t)zc->zc_nvlist_dst,
|
if (ddi_copyout(packed, (void *)(uintptr_t)zc->zc_nvlist_dst,
|
||||||
size, zc->zc_iflags) != 0)
|
size, zc->zc_iflags) != 0)
|
||||||
error = EFAULT;
|
error = EFAULT;
|
||||||
vmem_free(packed, size);
|
kmem_free(packed, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
zc->zc_nvlist_dst_size = size;
|
zc->zc_nvlist_dst_size = size;
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ zil_itx_create(uint64_t txtype, size_t lrsize)
|
||||||
|
|
||||||
lrsize = P2ROUNDUP_TYPED(lrsize, sizeof (uint64_t), size_t);
|
lrsize = P2ROUNDUP_TYPED(lrsize, sizeof (uint64_t), size_t);
|
||||||
|
|
||||||
itx = kmem_alloc(offsetof(itx_t, itx_lr)+lrsize, KM_SLEEP|KM_NODEBUG);
|
itx = kmem_alloc(offsetof(itx_t, itx_lr) + lrsize, KM_SLEEP);
|
||||||
itx->itx_lr.lrc_txtype = txtype;
|
itx->itx_lr.lrc_txtype = txtype;
|
||||||
itx->itx_lr.lrc_reclen = lrsize;
|
itx->itx_lr.lrc_reclen = lrsize;
|
||||||
itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */
|
itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */
|
||||||
|
|
Loading…
Reference in New Issue