Message ID | CAFO3S41ATqXBpFNz-sBqKtjMuf6P5=LT96w+maBa_Sm3v2EkHg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -156,14 +156,17 @@ EXPORT_SYMBOL_GPL(vhost_poll_flush); void vhost_work_queue(struct vhost_dev *dev, struct vhost_work *work) { unsigned long flags; + bool wakeup = false; spin_lock_irqsave(&dev->work_lock, flags); if (list_empty(&work->node)) { list_add_tail(&work->node, &dev->work_list); work->queue_seq++; - wake_up_process(dev->worker); + wakeup = true; } spin_unlock_irqrestore(&dev->work_lock, flags); + if (wakeup) + wake_up_process(dev->worker); }