diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index cc626fdaaae1..9ccf1eee3448 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -67,7 +67,6 @@ #include #include #include -#include #include #include #include @@ -262,9 +261,6 @@ extern kthread_t *zk_thread_create(caddr_t stk, size_t stksize, proc_t *pp, int state, pri_t pri, int detachstate); extern void zk_thread_join(kt_did_t tid); -#define kpreempt_disable() ((void)0) -#define kpreempt_enable() ((void)0) - #define PS_NONE -1 #define issig(why) (FALSE) diff --git a/module/zfs/fm.c b/module/zfs/fm.c index 4de901ed09c7..56d3981078f0 100644 --- a/module/zfs/fm.c +++ b/module/zfs/fm.c @@ -1515,13 +1515,7 @@ fm_ena_generate_cpu(uint64_t timestamp, processorid_t cpuid, uchar_t format) uint64_t fm_ena_generate(uint64_t timestamp, uchar_t format) { - uint64_t ena; - - kpreempt_disable(); - ena = fm_ena_generate_cpu(timestamp, getcpuid(), format); - kpreempt_enable(); - - return (ena); + return (fm_ena_generate_cpu(timestamp, getcpuid(), format)); } uint64_t diff --git a/module/zfs/txg.c b/module/zfs/txg.c index cdba6cb2512a..6cc5c913bec1 100644 --- a/module/zfs/txg.c +++ b/module/zfs/txg.c @@ -294,19 +294,9 @@ uint64_t txg_hold_open(dsl_pool_t *dp, txg_handle_t *th) { tx_state_t *tx = &dp->dp_tx; - tx_cpu_t *tc; + tx_cpu_t *tc = &tx->tx_cpu[CPU_SEQID]; uint64_t txg; - /* - * It appears the processor id is simply used as a "random" - * number to index into the array, and there isn't any other - * significance to the chosen tx_cpu. Because.. Why not use - * the current cpu to index into the array? - */ - kpreempt_disable(); - tc = &tx->tx_cpu[CPU_SEQID]; - kpreempt_enable(); - mutex_enter(&tc->tc_open_lock); txg = tx->tx_open_txg; diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 2d16e632de06..4e01f528b0a2 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -1542,19 +1542,14 @@ zio_nowait(zio_t *zio) if (zio->io_child_type == ZIO_CHILD_LOGICAL && zio_unique_parent(zio) == NULL) { - zio_t *pio; - /* * This is a logical async I/O with no parent to wait for it. * We add it to the spa_async_root_zio "Godfather" I/O which * will ensure they complete prior to unloading the pool. */ spa_t *spa = zio->io_spa; - kpreempt_disable(); - pio = spa->spa_async_zio_root[CPU_SEQID]; - kpreempt_enable(); - zio_add_child(pio, zio); + zio_add_child(spa->spa_async_zio_root[CPU_SEQID], zio); } __zio_execute(zio);