summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-08-21 20:53:01 -0700
committerBrian Behlendorf <[email protected]>2012-08-27 12:01:37 -0700
commit991fc1d7ae2589c01a939a9cbd0e866c90fdd03b (patch)
tree14a95bcdd52aa97a8651e9d867021203e26c2c53 /module/zfs
parent8630650a8d9cfba379a5b73bd95e903d577e0d8d (diff)
mzap_upgrade() must use kmem_alloc()
These allocations in mzap_update() used to be kmem_alloc() but were changed to vmem_alloc() due to the size of the allocation. However, since it turns out this function may be called in the context of the txg_sync thread they must be changed back to use a kmem_alloc() to ensure the KM_PUSHPAGE flag is honored. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/zap_micro.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/zap_micro.c b/module/zfs/zap_micro.c
index bd3d4a8d8..3072475f2 100644
--- a/module/zfs/zap_micro.c
+++ b/module/zfs/zap_micro.c
@@ -533,7 +533,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags)
ASSERT(RW_WRITE_HELD(&zap->zap_rwlock));
sz = zap->zap_dbuf->db_size;
- mzp = vmem_alloc(sz, KM_SLEEP);
+ mzp = kmem_alloc(sz, KM_PUSHPAGE | KM_NODEBUG);
bcopy(zap->zap_dbuf->db_data, mzp, sz);
nchunks = zap->zap_m.zap_num_chunks;
@@ -541,7 +541,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags)
err = dmu_object_set_blocksize(zap->zap_objset, zap->zap_object,
1ULL << fzap_default_block_shift, 0, tx);
if (err) {
- vmem_free(mzp, sz);
+ kmem_free(mzp, sz);
return (err);
}
}
@@ -567,7 +567,7 @@ mzap_upgrade(zap_t **zapp, dmu_tx_t *tx, zap_flags_t flags)
if (err)
break;
}
- vmem_free(mzp, sz);
+ kmem_free(mzp, sz);
*zapp = zap;
return (err);
}