diff options
Diffstat (limited to 'block/blk-mq-cpu.c')
-rw-r--r-- | block/blk-mq-cpu.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/block/blk-mq-cpu.c b/block/blk-mq-cpu.c index 0045ace9bdf0..20576e3476e9 100644 --- a/block/blk-mq-cpu.c +++ b/block/blk-mq-cpu.c | |||
@@ -28,32 +28,6 @@ static int blk_mq_main_cpu_notify(struct notifier_block *self, | |||
28 | return NOTIFY_OK; | 28 | return NOTIFY_OK; |
29 | } | 29 | } |
30 | 30 | ||
31 | static void blk_mq_cpu_notify(void *data, unsigned long action, | ||
32 | unsigned int cpu) | ||
33 | { | ||
34 | if (action == CPU_DEAD || action == CPU_DEAD_FROZEN) { | ||
35 | /* | ||
36 | * If the CPU goes away, ensure that we run any pending | ||
37 | * completions. | ||
38 | */ | ||
39 | struct llist_node *node; | ||
40 | struct request *rq; | ||
41 | |||
42 | local_irq_disable(); | ||
43 | |||
44 | node = llist_del_all(&per_cpu(ipi_lists, cpu)); | ||
45 | while (node) { | ||
46 | struct llist_node *next = node->next; | ||
47 | |||
48 | rq = llist_entry(node, struct request, ll_list); | ||
49 | __blk_mq_end_io(rq, rq->errors); | ||
50 | node = next; | ||
51 | } | ||
52 | |||
53 | local_irq_enable(); | ||
54 | } | ||
55 | } | ||
56 | |||
57 | static struct notifier_block __cpuinitdata blk_mq_main_cpu_notifier = { | 31 | static struct notifier_block __cpuinitdata blk_mq_main_cpu_notifier = { |
58 | .notifier_call = blk_mq_main_cpu_notify, | 32 | .notifier_call = blk_mq_main_cpu_notify, |
59 | }; | 33 | }; |
@@ -82,12 +56,7 @@ void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, | |||
82 | notifier->data = data; | 56 | notifier->data = data; |
83 | } | 57 | } |
84 | 58 | ||
85 | static struct blk_mq_cpu_notifier __cpuinitdata cpu_notifier = { | ||
86 | .notify = blk_mq_cpu_notify, | ||
87 | }; | ||
88 | |||
89 | void __init blk_mq_cpu_init(void) | 59 | void __init blk_mq_cpu_init(void) |
90 | { | 60 | { |
91 | register_hotcpu_notifier(&blk_mq_main_cpu_notifier); | 61 | register_hotcpu_notifier(&blk_mq_main_cpu_notifier); |
92 | blk_mq_register_cpu_notifier(&cpu_notifier); | ||
93 | } | 62 | } |