Skip to content

Commit

Permalink
workqueue: mark lock acquisition on worker_maybe_bind_and_lock()
Browse files Browse the repository at this point in the history
worker_maybe_bind_and_lock() actually grabs gcwq->lock but was missing proper
annotation. Add it. So this patch will remove following sparse warnings:

 kernel/workqueue.c:1214:13: warning: context imbalance in 'worker_maybe_bind_and_lock' - wrong count at exit
 arch/x86/include/asm/irqflags.h:44:9: warning: context imbalance in 'worker_rebind_fn' - unexpected unlock
 kernel/workqueue.c:1991:17: warning: context imbalance in 'rescuer_thread' - unexpected unlock

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Namhyung Kim authored and Tejun Heo committed Aug 23, 2010
1 parent 06bd6eb commit 972fa1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,6 +1212,7 @@ static void worker_leave_idle(struct worker *worker)
* bound), %false if offline.
*/
static bool worker_maybe_bind_and_lock(struct worker *worker)
__acquires(&gcwq->lock)
{
struct global_cwq *gcwq = worker->gcwq;
struct task_struct *task = worker->task;
Expand Down

0 comments on commit 972fa1c

Please sign in to comment.