Revert changes to correct TopGit merge
I've noticed the TopGit linux-zfs-branch has some linux-kernel-mem changes which were incorrectly merged. To fix the issue I'm reverting the changes in the linux-kernel-mem topic branch, then remerging the revert, and finally reapplying and merging the change correctly.
This commit is contained in:
parent
743e2cde8f
commit
992e89df07
|
@ -151,7 +151,7 @@ __dprintf(const char *file, const char *func, int line, const char *fmt, ...)
|
|||
static void
|
||||
history_str_free(char *buf)
|
||||
{
|
||||
vmem_free(buf, HIS_MAX_RECORD_LEN);
|
||||
kmem_free(buf, HIS_MAX_RECORD_LEN);
|
||||
}
|
||||
|
||||
static char *
|
||||
|
@ -162,7 +162,7 @@ history_str_get(zfs_cmd_t *zc)
|
|||
if (zc->zc_history == 0)
|
||||
return (NULL);
|
||||
|
||||
buf = vmem_alloc(HIS_MAX_RECORD_LEN, KM_SLEEP);
|
||||
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);
|
||||
|
@ -959,13 +959,13 @@ put_nvlist(zfs_cmd_t *zc, nvlist_t *nvl)
|
|||
if (size > zc->zc_nvlist_dst_size) {
|
||||
error = ENOMEM;
|
||||
} else {
|
||||
packed = vmem_alloc(size, KM_SLEEP);
|
||||
packed = kmem_alloc(size, KM_SLEEP);
|
||||
VERIFY(nvlist_pack(nvl, &packed, &size, NV_ENCODE_NATIVE,
|
||||
KM_SLEEP) == 0);
|
||||
if (ddi_copyout(packed, (void *)(uintptr_t)zc->zc_nvlist_dst,
|
||||
size, zc->zc_iflags) != 0)
|
||||
error = EFAULT;
|
||||
vmem_free(packed, size);
|
||||
kmem_free(packed, size);
|
||||
}
|
||||
|
||||
zc->zc_nvlist_dst_size = size;
|
||||
|
@ -4390,7 +4390,7 @@ zfsdev_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp)
|
|||
if (vec >= sizeof (zfs_ioc_vec) / sizeof (zfs_ioc_vec[0]))
|
||||
return (EINVAL);
|
||||
|
||||
zc = vmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
|
||||
zc = kmem_zalloc(sizeof (zfs_cmd_t), KM_SLEEP);
|
||||
|
||||
error = ddi_copyin((void *)arg, zc, sizeof (zfs_cmd_t), flag);
|
||||
if (error != 0)
|
||||
|
@ -4439,7 +4439,7 @@ zfsdev_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp)
|
|||
zfs_log_history(zc);
|
||||
}
|
||||
|
||||
vmem_free(zc, sizeof (zfs_cmd_t));
|
||||
kmem_free(zc, sizeof (zfs_cmd_t));
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
|
|
@ -1040,7 +1040,7 @@ zil_itx_create(uint64_t txtype, size_t lrsize)
|
|||
|
||||
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_reclen = lrsize;
|
||||
itx->itx_sod = lrsize; /* if write & WR_NEED_COPY will be increased */
|
||||
|
@ -1708,7 +1708,7 @@ zil_replay(objset_t *os, void *arg, zil_replay_func_t *replay_func[TX_MAX_TYPE])
|
|||
zr.zr_replay = replay_func;
|
||||
zr.zr_arg = arg;
|
||||
zr.zr_byteswap = BP_SHOULD_BYTESWAP(&zh->zh_log);
|
||||
zr.zr_lr = vmem_alloc(2 * SPA_MAXBLOCKSIZE, KM_SLEEP);
|
||||
zr.zr_lr = kmem_alloc(2 * SPA_MAXBLOCKSIZE, KM_SLEEP);
|
||||
|
||||
/*
|
||||
* Wait for in-progress removes to sync before starting replay.
|
||||
|
@ -1720,7 +1720,7 @@ zil_replay(objset_t *os, void *arg, zil_replay_func_t *replay_func[TX_MAX_TYPE])
|
|||
ASSERT(zilog->zl_replay_blks == 0);
|
||||
(void) zil_parse(zilog, zil_incr_blks, zil_replay_log_record, &zr,
|
||||
zh->zh_claim_txg);
|
||||
vmem_free(zr.zr_lr, 2 * SPA_MAXBLOCKSIZE);
|
||||
kmem_free(zr.zr_lr, 2 * SPA_MAXBLOCKSIZE);
|
||||
|
||||
zil_destroy(zilog, B_FALSE);
|
||||
txg_wait_synced(zilog->zl_dmu_pool, zilog->zl_destroy_txg);
|
||||
|
|
Loading…
Reference in New Issue