aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zio.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zio.c')
-rw-r--r--module/zfs/zio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/module/zfs/zio.c b/module/zfs/zio.c
index 844b909fb..0ba167c62 100644
--- a/module/zfs/zio.c
+++ b/module/zfs/zio.c
@@ -1467,14 +1467,19 @@ 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(spa->spa_async_zio_root[CPU_SEQID], zio);
+ zio_add_child(pio, zio);
}
__zio_execute(zio);