Commit 81630e27 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

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.

Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 13c7863d
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -543,24 +543,11 @@ static inline void blkcg_bio_issue_init(struct bio *bio)
static inline bool blkcg_bio_issue_check(struct request_queue *q,
					 struct bio *bio)
{
	struct blkcg_gq *blkg;
	struct blkcg_gq *blkg = bio->bi_blkg;
	bool throtl = false;

	rcu_read_lock();

	if (!bio->bi_blkg) {
		char b[BDEVNAME_SIZE];

		WARN_ONCE(1,
			  "no blkg associated for bio on block-device: %s\n",
			  bio_devname(bio, b));
		bio_associate_blkg(bio);
	}

	blkg = bio->bi_blkg;

	throtl = blk_throtl_bio(q, blkg, bio);

	if (!throtl) {
		struct blkg_iostat_set *bis;
		int rwd, cpu;