Lines Matching full:w

52 	struct bt_work *w, *tmp;  in btracker_destroy()  local
55 list_for_each_entry_safe (w, tmp, &b->queued, list) { in btracker_destroy()
56 list_del(&w->list); in btracker_destroy()
57 kmem_cache_free(btracker_work_cache, w); in btracker_destroy()
79 struct bt_work *w; in __insert_pending() local
83 w = container_of(*new, struct bt_work, node); in __insert_pending()
86 cmp = cmp_oblock(w->work.oblock, nw->work.oblock); in __insert_pending()
108 struct bt_work *w; in __find_pending() local
112 w = container_of(*new, struct bt_work, node); in __find_pending()
114 cmp = cmp_oblock(w->work.oblock, oblock); in __find_pending()
125 return *new ? w : NULL; in __find_pending()
129 static void update_stats(struct background_tracker *b, struct policy_work *w, int delta) in update_stats() argument
131 switch (w->op) { in update_stats()
177 struct bt_work *w; in btracker_queue() local
182 w = alloc_work(b); in btracker_queue()
183 if (!w) in btracker_queue()
186 memcpy(&w->work, work, sizeof(*work)); in btracker_queue()
188 if (!__insert_pending(b, w)) { in btracker_queue()
193 kmem_cache_free(btracker_work_cache, w); in btracker_queue()
198 *pwork = &w->work; in btracker_queue()
199 list_add(&w->list, &b->issued); in btracker_queue()
201 list_add(&w->list, &b->queued); in btracker_queue()
202 update_stats(b, &w->work, 1); in btracker_queue()
213 struct bt_work *w; in btracker_issue() local
218 w = list_first_entry(&b->queued, struct bt_work, list); in btracker_issue()
219 list_move(&w->list, &b->issued); in btracker_issue()
220 *work = &w->work; in btracker_issue()
229 struct bt_work *w = container_of(op, struct bt_work, work); in btracker_complete() local
231 update_stats(b, &w->work, -1); in btracker_complete()
232 rb_erase(&w->node, &b->pending); in btracker_complete()
233 list_del(&w->list); in btracker_complete()
234 kmem_cache_free(btracker_work_cache, w); in btracker_complete()