7 #include <linux/module.h>
8 #include <linux/slab.h>
18 list_del_init(&next->queuelist);
23 struct noop_data *nd = q->elevator->elevator_data;
25 if (!list_empty(&nd->
queue)) {
28 list_del_init(&rq->queuelist);
37 struct noop_data *nd = q->elevator->elevator_data;
45 struct noop_data *nd = q->elevator->elevator_data;
47 if (rq->queuelist.prev == &nd->
queue)
55 struct noop_data *nd = q->elevator->elevator_data;
57 if (rq->queuelist.next == &nd->
queue)
66 nd = kmalloc_node(
sizeof(*nd),
GFP_KERNEL, q->node);
70 INIT_LIST_HEAD(&nd->
queue);
71 q->elevator->elevator_data = nd;
75 static void noop_exit_queue(
struct elevator_queue *
e)
83 static struct elevator_type elevator_noop = {
85 .elevator_merge_req_fn = noop_merged_requests,
86 .elevator_dispatch_fn = noop_dispatch,
87 .elevator_add_req_fn = noop_add_request,
88 .elevator_former_req_fn = noop_former_request,
89 .elevator_latter_req_fn = noop_latter_request,
90 .elevator_init_fn = noop_init_queue,
91 .elevator_exit_fn = noop_exit_queue,
93 .elevator_name =
"noop",
97 static int __init noop_init(
void)
102 static void __exit noop_exit(
void)