diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/os/linux/spl/spl-taskq.c | 7 | ||||
-rw-r--r-- | module/zfs/zio.c | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/module/os/linux/spl/spl-taskq.c b/module/os/linux/spl/spl-taskq.c index 4df44ade8..9cbf3e381 100644 --- a/module/os/linux/spl/spl-taskq.c +++ b/module/os/linux/spl/spl-taskq.c @@ -491,6 +491,13 @@ taskq_member(taskq_t *tq, kthread_t *t) } EXPORT_SYMBOL(taskq_member); +taskq_t * +taskq_of_curthread(void) +{ + return (tsd_get(taskq_tsd)); +} +EXPORT_SYMBOL(taskq_of_curthread); + /* * Cancel an already dispatched task given the task id. Still pending tasks * will be immediately canceled, and if the task is active the function will diff --git a/module/zfs/zio.c b/module/zfs/zio.c index cbe6fc751..bf6b5afab 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -1865,14 +1865,15 @@ zio_taskq_dispatch(zio_t *zio, zio_taskq_type_t q, boolean_t cutinline) static boolean_t zio_taskq_member(zio_t *zio, zio_taskq_type_t q) { - kthread_t *executor = zio->io_executor; spa_t *spa = zio->io_spa; + taskq_t *tq = taskq_of_curthread(); + for (zio_type_t t = 0; t < ZIO_TYPES; t++) { spa_taskqs_t *tqs = &spa->spa_zio_taskq[t][q]; uint_t i; for (i = 0; i < tqs->stqs_count; i++) { - if (taskq_member(tqs->stqs_taskq[i], executor)) + if (tqs->stqs_taskq[i] == tq) return (B_TRUE); } } |