提交 06bd6ebf 编写于 作者: N Namhyung Kim 提交者: Tejun Heo

workqueue: annotate lock context change

Some of internal functions called within gcwq->lock context releases and
regrabs the lock but were missing proper annotations. Add it.
Signed-off-by: NNamhyung Kim <namhyung@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 8d9df9f0
...@@ -1485,6 +1485,8 @@ static void gcwq_mayday_timeout(unsigned long __gcwq) ...@@ -1485,6 +1485,8 @@ static void gcwq_mayday_timeout(unsigned long __gcwq)
* otherwise. * otherwise.
*/ */
static bool maybe_create_worker(struct global_cwq *gcwq) static bool maybe_create_worker(struct global_cwq *gcwq)
__releases(&gcwq->lock)
__acquires(&gcwq->lock)
{ {
if (!need_to_create_worker(gcwq)) if (!need_to_create_worker(gcwq))
return false; return false;
...@@ -1722,6 +1724,8 @@ static void cwq_dec_nr_in_flight(struct cpu_workqueue_struct *cwq, int color) ...@@ -1722,6 +1724,8 @@ static void cwq_dec_nr_in_flight(struct cpu_workqueue_struct *cwq, int color)
* spin_lock_irq(gcwq->lock) which is released and regrabbed. * spin_lock_irq(gcwq->lock) which is released and regrabbed.
*/ */
static void process_one_work(struct worker *worker, struct work_struct *work) static void process_one_work(struct worker *worker, struct work_struct *work)
__releases(&gcwq->lock)
__acquires(&gcwq->lock)
{ {
struct cpu_workqueue_struct *cwq = get_work_cwq(work); struct cpu_workqueue_struct *cwq = get_work_cwq(work);
struct global_cwq *gcwq = cwq->gcwq; struct global_cwq *gcwq = cwq->gcwq;
...@@ -3230,6 +3234,8 @@ static int __cpuinit trustee_thread(void *__gcwq) ...@@ -3230,6 +3234,8 @@ static int __cpuinit trustee_thread(void *__gcwq)
* multiple times. To be used by cpu_callback. * multiple times. To be used by cpu_callback.
*/ */
static void __cpuinit wait_trustee_state(struct global_cwq *gcwq, int state) static void __cpuinit wait_trustee_state(struct global_cwq *gcwq, int state)
__releases(&gcwq->lock)
__acquires(&gcwq->lock)
{ {
if (!(gcwq->trustee_state == state || if (!(gcwq->trustee_state == state ||
gcwq->trustee_state == TRUSTEE_DONE)) { gcwq->trustee_state == TRUSTEE_DONE)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册