Lines Matching refs:worker

824 	struct loop_worker *cur_worker, *worker = NULL;  in loop_queue_work()  local
839 worker = cur_worker; in loop_queue_work()
847 if (worker) in loop_queue_work()
850 worker = kzalloc(sizeof(struct loop_worker), GFP_NOWAIT | __GFP_NOWARN); in loop_queue_work()
855 if (!worker) { in loop_queue_work()
863 worker->blkcg_css = cmd->blkcg_css; in loop_queue_work()
864 css_get(worker->blkcg_css); in loop_queue_work()
865 INIT_WORK(&worker->work, loop_workfn); in loop_queue_work()
866 INIT_LIST_HEAD(&worker->cmd_list); in loop_queue_work()
867 INIT_LIST_HEAD(&worker->idle_list); in loop_queue_work()
868 worker->lo = lo; in loop_queue_work()
869 rb_link_node(&worker->rb_node, parent, node); in loop_queue_work()
870 rb_insert_color(&worker->rb_node, &lo->worker_tree); in loop_queue_work()
872 if (worker) { in loop_queue_work()
878 if (!list_empty(&worker->idle_list)) in loop_queue_work()
879 list_del_init(&worker->idle_list); in loop_queue_work()
880 work = &worker->work; in loop_queue_work()
881 cmd_list = &worker->cmd_list; in loop_queue_work()
1092 struct loop_worker *pos, *worker; in __loop_clr_fd() local
1126 list_for_each_entry_safe(worker, pos, &lo->idle_worker_list, in __loop_clr_fd()
1128 list_del(&worker->idle_list); in __loop_clr_fd()
1129 rb_erase(&worker->rb_node, &lo->worker_tree); in __loop_clr_fd()
1130 css_put(worker->blkcg_css); in __loop_clr_fd()
1131 kfree(worker); in __loop_clr_fd()
1883 static void loop_process_work(struct loop_worker *worker, in loop_process_work() argument
1908 if (worker && !work_pending(&worker->work)) { in loop_process_work()
1909 worker->last_ran_at = jiffies; in loop_process_work()
1910 list_add_tail(&worker->idle_list, &lo->idle_worker_list); in loop_process_work()
1919 struct loop_worker *worker = in loop_workfn() local
1921 loop_process_work(worker, &worker->cmd_list, worker->lo); in loop_workfn()
1934 struct loop_worker *pos, *worker; in loop_free_idle_workers() local
1937 list_for_each_entry_safe(worker, pos, &lo->idle_worker_list, in loop_free_idle_workers()
1939 if (time_is_after_jiffies(worker->last_ran_at + in loop_free_idle_workers()
1942 list_del(&worker->idle_list); in loop_free_idle_workers()
1943 rb_erase(&worker->rb_node, &lo->worker_tree); in loop_free_idle_workers()
1944 css_put(worker->blkcg_css); in loop_free_idle_workers()
1945 kfree(worker); in loop_free_idle_workers()