Skip to content

Commit

Permalink
blk-cgroup: remove the !bio->bi_blkg check in blkcg_bio_issue_check
Browse files Browse the repository at this point in the history
This is purely a sanity check for grave programming errors.  Remove it
to simplify further work in this area.

Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Jun 29, 2020
1 parent 13c7863 commit 81630e2
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions include/linux/blk-cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 81630e2

Please sign in to comment.