]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Assume TQ_SLEEP when not explicitly specified.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 23 Apr 2010 21:39:47 +0000 (14:39 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 23 Apr 2010 21:39:47 +0000 (14:39 -0700)
module/spl/spl-taskq.c

index 16b1382d925d0bdd5bbf0ba6edbd52a244d15d82..64719d762db71d5ec8a0b265370a61cd44cc9f4c 100644 (file)
@@ -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);