mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
Add assert under lock to detect cases of dispach of a preallocated
taskq work item to more than one queue concurrently. Also, please see discussion in zfsonlinux/zfs#3840. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com> Closes #609
This commit is contained in:
parent
cce83ba0ec
commit
9243b0fb47
@ -683,6 +683,12 @@ taskq_dispatch_ent(taskq_t *tq, task_func_t func, void *arg, uint_t flags,
|
||||
|
||||
spin_lock(&t->tqent_lock);
|
||||
|
||||
/*
|
||||
* Make sure the entry is not on some other taskq; it is important to
|
||||
* ASSERT() under lock
|
||||
*/
|
||||
ASSERT(taskq_empty_ent(t));
|
||||
|
||||
/*
|
||||
* Mark it as a prealloc'd task. This is important
|
||||
* to ensure that we don't free it later.
|
||||
|
Loading…
Reference in New Issue
Block a user