Skip to contentSkip to conversation

workqueue: Fix manage_workers() RETURNS description

PATCH In review Libin 2 participants 2 messages Aug 16, 2013 Workqueue

lore
Share & tools
lore

Libin

author
#0 lore raw

PATCH 1/1 workqueue: Fix manage_workers() RETURNS description

No functional change. The comment of function manage_workers() RETURNS description is obvious wrong, same as the CONTEXT. Fix it.

---
 kernel/workqueue.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/workqueue.c +2 -2
index 7f5d4be..e8ee7a4 100644
@@ -2033,8 +2033,8 @@ static bool maybe_destroy_workers(struct worker_pool *pool)
  * multiple times.  Does GFP_KERNEL allocations.
  *
  * RETURNS:
- * spin_lock_irq(pool->lock) which may be released and regrabbed
- * multiple times.  Does GFP_KERNEL allocations.
+ * %false if the poll don't need management and the caller can safely 
+ * start processing works, %true otherwise.
  */
 static bool manage_workers(struct worker *worker)
 {
Signature · 1 line
1.8.2.1
maintainer
#1 lore raw

kernel/workqueue.c static bool maybe_destroy_workers(struct worker_pool *pool) · line 2036

Quoted 7 lines · Libin
kernel/workqueue.c +1 -2
@@ -2033,8 +2033,8 @@ static bool maybe_destroy_workers(struct worker_pool *pool)
  * multiple times.  Does GFP_KERNEL allocations.
  *
  * RETURNS:
- * spin_lock_irq(pool->lock) which may be released and regrabbed
- * multiple times.  Does GFP_KERNEL allocations.
+ * %false if the poll don't need management and the caller can safely 
                    ^
		    typo

kernel/workqueue.c static bool maybe_destroy_workers(struct worker_pool *pool) · line 2037

Quoted 1 line
kernel/workqueue.c +1 -0
+ * start processing works, %true otherwise.

So, %true indicates that the function released pool->lock and reacquired it to perform some management function and that the conditions that the caller verified while holding the lock before calling the function might no longer be true.

Can you please update the patch accordingly?

Thanks.

Signature · 1 line
tejun