From: Brian Behlendorf Date: Fri, 23 Apr 2010 21:39:47 +0000 (-0700) Subject: Assume TQ_SLEEP when not explicitly specified. X-Git-Tag: spl-0.4.9~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d05ec4b45f77c0f401098d88b5299ef090c73ca9;p=spl Assume TQ_SLEEP when not explicitly specified. --- diff --git a/module/spl/spl-taskq.c b/module/spl/spl-taskq.c index 16b1382..64719d7 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);