typedef struct spl_kmem_alloc {
struct spl_kmem_cache *ska_cache; /* Owned by cache */
int ska_flags; /* Allocation flags */
- struct delayed_work ska_work; /* Allocation work */
+ taskq_ent_t ska_tqe; /* Task queue entry */
} spl_kmem_alloc_t;
typedef struct spl_kmem_emergency {
static void
spl_cache_grow_work(void *data)
{
- spl_kmem_alloc_t *ska =
- spl_get_work_data(data, spl_kmem_alloc_t, ska_work.work);
+ spl_kmem_alloc_t *ska = (spl_kmem_alloc_t *)data;
spl_kmem_cache_t *skc = ska->ska_cache;
spl_kmem_slab_t *sks;
atomic_inc(&skc->skc_ref);
ska->ska_cache = skc;
ska->ska_flags = flags & ~__GFP_FS;
- spl_init_delayed_work(&ska->ska_work, spl_cache_grow_work, ska);
- schedule_delayed_work(&ska->ska_work, 0);
+ taskq_init_ent(&ska->ska_tqe);
+ taskq_dispatch_ent(spl_kmem_cache_taskq,
+ spl_cache_grow_work, ska, 0, &ska->ska_tqe);
}
/*