]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Initialize dbu_tqent in dmu_buf_init_user()
authorTim Chase <tim@chase2k.com>
Sat, 16 May 2015 15:40:45 +0000 (10:40 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 18 May 2015 18:39:14 +0000 (11:39 -0700)
The dbu_evict_taskq added in 0c66c32d is only invoked via
taskq_dispatch_ent(). In these cases, ZoL's implementation of taskqs
requires the entries to be initialized first with taskq_init_ent() in
order that, among other things, the embedded spinlock is initialized
properly.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3419

include/sys/dmu.h

index 08871e890a6e9ab6ff15921d20beeca73f42c26f..d3874335b78df19415814c085f86fdb72f710b41 100644 (file)
@@ -558,6 +558,7 @@ dmu_buf_init_user(dmu_buf_user_t *dbu, dmu_buf_evict_func_t *evict_func,
        ASSERT(dbu->dbu_evict_func == NULL);
        ASSERT(evict_func != NULL);
        dbu->dbu_evict_func = evict_func;
+       taskq_init_ent(&dbu->dbu_tqent);
 #ifdef ZFS_DEBUG
        dbu->dbu_clear_on_evict_dbufp = clear_on_evict_dbufp;
 #endif