Don't use tq->tq_lock_flags

The flags argument in spin_lock_irqsave is modified out side of spin_lock
context. We cannot use a shared variable like tq->tq_lock_flags for them. This
patch removes it and uses local variable for the flags.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #506
This commit is contained in:
Chunwei Chen
2015-12-03 15:06:03 -08:00
committed by Brian Behlendorf
parent 326172d854
commit 066b89e685
2 changed files with 62 additions and 62 deletions
-1
View File
@@ -68,7 +68,6 @@ typedef void (task_func_t)(void *);
typedef struct taskq {
spinlock_t tq_lock; /* protects taskq_t */
unsigned long tq_lock_flags; /* interrupt state */
char *tq_name; /* taskq name */
struct list_head tq_thread_list;/* list of all threads */
struct list_head tq_active_list;/* list of active threads */