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

Showing the changes to include/linux (1 of 1 file). Show all

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
543543 static inline bool blkcg_bio_issue_check(struct request_queue *q,
544544 struct bio *bio)
545545 {
546− struct blkcg_gq *blkg;
546+ struct blkcg_gq *blkg = bio->bi_blkg;
547547 bool throtl = false;
548548
549549 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−
562550 throtl = blk_throtl_bio(q, blkg, bio);
563−
564551 if (!throtl) {
565552 struct blkg_iostat_set *bis;
566553 int rwd, cpu;