diff --git a/include/linux/wait.h b/include/linux/wait.h index 40dbc01cecb8..2eae4fc9b459 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -209,7 +209,7 @@ __remove_wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq list_del(&wq_entry->entry); } -int __wake_up(struct wait_queue_head *wq_head, unsigned int mode, int nr, void *key); +void __wake_up(struct wait_queue_head *wq_head, unsigned int mode, int nr, void *key); void __wake_up_locked_key(struct wait_queue_head *wq_head, unsigned int mode, void *key); void __wake_up_locked_key_bookmark(struct wait_queue_head *wq_head, unsigned int mode, void *key, wait_queue_entry_t *bookmark); diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c index 596b19afbf14..ba93b6cba096 100644 --- a/kernel/sched/wait.c +++ b/kernel/sched/wait.c @@ -122,12 +122,11 @@ static int __wake_up_common(struct wait_queue_head *wq_head, unsigned int mode, return nr_exclusive; } -static int __wake_up_common_lock(struct wait_queue_head *wq_head, unsigned int mode, +static void __wake_up_common_lock(struct wait_queue_head *wq_head, unsigned int mode, int nr_exclusive, int wake_flags, void *key) { unsigned long flags; wait_queue_entry_t bookmark; - int remaining = nr_exclusive; bookmark.flags = 0; bookmark.private = NULL; @@ -136,12 +135,10 @@ static int __wake_up_common_lock(struct wait_queue_head *wq_head, unsigned int m do { spin_lock_irqsave(&wq_head->lock, flags); - remaining = __wake_up_common(wq_head, mode, remaining, + nr_exclusive = __wake_up_common(wq_head, mode, nr_exclusive, wake_flags, key, &bookmark); spin_unlock_irqrestore(&wq_head->lock, flags); } while (bookmark.flags & WQ_FLAG_BOOKMARK); - - return nr_exclusive - remaining; } /** @@ -151,14 +148,13 @@ static int __wake_up_common_lock(struct wait_queue_head *wq_head, unsigned int m * @nr_exclusive: how many wake-one or wake-many threads to wake up * @key: is directly passed to the wakeup function * - * If this function wakes up a task, it executes a full memory barrier - * before accessing the task state. Returns the number of exclusive - * tasks that were awaken. + * If this function wakes up a task, it executes a full memory barrier before + * accessing the task state. */ -int __wake_up(struct wait_queue_head *wq_head, unsigned int mode, - int nr_exclusive, void *key) +void __wake_up(struct wait_queue_head *wq_head, unsigned int mode, + int nr_exclusive, void *key) { - return __wake_up_common_lock(wq_head, mode, nr_exclusive, 0, key); + __wake_up_common_lock(wq_head, mode, nr_exclusive, 0, key); } EXPORT_SYMBOL(__wake_up);