History

blk-cgroup: remove the !bio->bi_blkg check in blkcg_bio_issue_check

This is purely a sanity check for grave programming errors. Remove it to simplify further work in this area.

Christoph Hellwig committed 6 years ago

Commit 81630e21 parent 13c78631 file · +1 −14Browse files

Unified · Split

include/linux/blk-cgroup.h+1−14
@@ -543,24 +543,11 @@ static inline void blkcg_bio_issue_init(struct bio *bio) · 542 unmodified lines
543static inline bool blkcg_bio_issue_check(struct request_queue *q,543static inline bool blkcg_bio_issue_check(struct request_queue *q,
544 struct bio *bio)544 struct bio *bio)
545{545{
546 struct blkcg_gq *blkg;546 struct blkcg_gq *blkg = bio->bi_blkg;
547 bool throtl = false;547 bool throtl = false;
548 548
549 rcu_read_lock();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 throtl = blk_throtl_bio(q, blkg, bio);550 throtl = blk_throtl_bio(q, blkg, bio);
563
564 if (!throtl) {551 if (!throtl) {
565 struct blkg_iostat_set *bis;552 struct blkg_iostat_set *bis;
566 int rwd, cpu;553 int rwd, cpu;