This is purely a sanity check for grave programming errors. Remove it to simplify further work in this area.
Unified · Split
| @@ -543,24 +543,11 @@ static inline void blkcg_bio_issue_init(struct bio *bio) · 542 unmodified lines | ||
| 543 | 543 | static inline bool blkcg_bio_issue_check(struct request_queue *q, |
| 544 | 544 | struct bio *bio) |
| 545 | 545 | { |
| 546 | − struct blkcg_gq *blkg; | |
| 546 | + struct blkcg_gq *blkg = bio->bi_blkg; | |
| 547 | 547 | bool throtl = false; |
| 548 | 548 | |
| 549 | 549 | rcu_read_lock(); |
| 550 | − | |
| 551 | − if (!bio->bi_blkg) { | |
| 552 | − char b[BDEVNAME_SIZE]; | |
| 553 | − | |
| 554 | − WARN_ONCE(1, | |
| 555 | − "no blkg associated for bio on block-device: %s\n", | |
| 556 | − bio_devname(bio, b)); | |
| 557 | − bio_associate_blkg(bio); | |
| 558 | − } | |
| 559 | − | |
| 560 | − blkg = bio->bi_blkg; | |
| 561 | − | |
| 562 | 550 | throtl = blk_throtl_bio(q, blkg, bio); |
| 563 | − | |
| 564 | 551 | if (!throtl) { |
| 565 | 552 | struct blkg_iostat_set *bis; |
| 566 | 553 | int rwd, cpu; |