The request_queue is frozen and quiesced while the elevator init_sched() method runs, so queue_lock is not needed for BFQ cgroup initialization.
Unified · Split
| @@ -7204,10 +7204,7 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) · 7203 unmodified lines | ||
| 7204 | 7204 | return -ENOMEM; |
| 7205 | 7205 | |
| 7206 | 7206 | eq->elevator_data = bfqd; |
| 7207 | − | |
| 7208 | − spin_lock_irq(&q->queue_lock); | |
| 7209 | 7207 | q->elevator = eq; |
| 7210 | − spin_unlock_irq(&q->queue_lock); | |
| 7211 | 7208 | |
| 7212 | 7209 | /* |
| 7213 | 7210 | * Our fallback bfqq if bfq_find_alloc_queue() runs into OOM issues. |
| @@ -7240,7 +7237,6 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) · 26 unmodified lines | ||
| 7240 | 7237 | * If the disk supports multiple actuators, copy independent |
| 7241 | 7238 | * access ranges from the request queue structure. |
| 7242 | 7239 | */ |
| 7243 | − spin_lock_irq(&q->queue_lock); | |
| 7244 | 7240 | if (ia_ranges) { |
| 7245 | 7241 | /* |
| 7246 | 7242 | * Check if the disk ia_ranges size exceeds the current bfq |
| @@ -7266,7 +7262,6 @@ static int bfq_init_queue(struct request_queue *q, struct elevator_queue *eq) · 19 unmodified lines | ||
| 7266 | 7262 | bfqd->sector[0] = 0; |
| 7267 | 7263 | bfqd->nr_sectors[0] = get_capacity(q->disk); |
| 7268 | 7264 | } |
| 7269 | − spin_unlock_irq(&q->queue_lock); | |
| 7270 | 7265 | |
| 7271 | 7266 | INIT_LIST_HEAD(&bfqd->dispatch); |
| 7272 | 7267 | |