From d05ec4b45f77c0f401098d88b5299ef090c73ca9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 23 Apr 2010 14:39:47 -0700 Subject: [PATCH] Assume TQ_SLEEP when not explicitly specified. --- module/spl/spl-taskq.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 16b1382d92..64719d762d 100644 --- a/module/spl/spl-taskq.c +++ b/module/spl/spl-taskq.c @@ -248,6 +248,11 @@ __taskq_dispatch(taskq_t *tq, task_func_t func, void *arg, uint_t flags) ASSERT(tq); ASSERT(func); + + /* Solaris assumes TQ_SLEEP if not passed explicitly */ + if (!(flags & (TQ_SLEEP | TQ_NOSLEEP))) + flags |= TQ_SLEEP; + if (unlikely(in_atomic() && (flags & TQ_SLEEP))) { CERROR("May schedule while atomic: %s/0x%08x/%d\n", current->comm, preempt_count(), current->pid);