Lines Matching refs:s
53 struct selector *s = kmalloc(sizeof(*s), GFP_KERNEL); in alloc_selector() local
55 if (s) { in alloc_selector()
56 INIT_LIST_HEAD(&s->valid_paths); in alloc_selector()
57 INIT_LIST_HEAD(&s->invalid_paths); in alloc_selector()
60 return s; in alloc_selector()
65 struct selector *s; in rr_create() local
67 s = alloc_selector(); in rr_create()
68 if (!s) in rr_create()
71 ps->context = s; in rr_create()
77 struct selector *s = (struct selector *) ps->context; in rr_destroy() local
79 free_paths(&s->valid_paths); in rr_destroy()
80 free_paths(&s->invalid_paths); in rr_destroy()
81 kfree(s); in rr_destroy()
114 struct selector *s = (struct selector *) ps->context; in rr_add_path() local
142 list_add_tail(&pi->list, &s->valid_paths); in rr_add_path()
149 struct selector *s = (struct selector *) ps->context; in rr_fail_path() local
152 list_move(&pi->list, &s->invalid_paths); in rr_fail_path()
157 struct selector *s = (struct selector *) ps->context; in rr_reinstate_path() local
160 list_move(&pi->list, &s->valid_paths); in rr_reinstate_path()
168 struct selector *s = (struct selector *) ps->context; in rr_select_path() local
171 if (!list_empty(&s->valid_paths)) { in rr_select_path()
172 pi = list_entry(s->valid_paths.next, struct path_info, list); in rr_select_path()
173 list_move_tail(&pi->list, &s->valid_paths); in rr_select_path()