diff options
| author | Dennis Zhou (Facebook) <dennisszhou@gmail.com> | 2018-09-11 14:41:33 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-09-21 22:29:13 -0400 |
| commit | c839e7a03f92bafd71fd145b470dcdc7f43f2d4c (patch) | |
| tree | 2327729d2f67268d179beb22f4ef9db44b156af1 /drivers | |
| parent | bdc2491708c47601603918a9a20acddef6e1d814 (diff) | |
blkcg: remove bio->bi_css and instead use bio->bi_blkg
Prior patches ensured that all bios are now associated with some blkg.
This now makes bio->bi_css unnecessary as blkg maintains a reference to
the blkcg already.
This patch removes the field bi_css and transfers corresponding uses to
access via bi_blkg.
Signed-off-by: Dennis Zhou <dennisszhou@gmail.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/block/loop.c | 5 | ||||
| -rw-r--r-- | drivers/md/raid0.c | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index ea9debf59b22..abad6d15f956 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
| @@ -77,6 +77,7 @@ | |||
| 77 | #include <linux/falloc.h> | 77 | #include <linux/falloc.h> |
| 78 | #include <linux/uio.h> | 78 | #include <linux/uio.h> |
| 79 | #include <linux/ioprio.h> | 79 | #include <linux/ioprio.h> |
| 80 | #include <linux/blk-cgroup.h> | ||
| 80 | 81 | ||
| 81 | #include "loop.h" | 82 | #include "loop.h" |
| 82 | 83 | ||
| @@ -1760,8 +1761,8 @@ static blk_status_t loop_queue_rq(struct blk_mq_hw_ctx *hctx, | |||
| 1760 | 1761 | ||
| 1761 | /* always use the first bio's css */ | 1762 | /* always use the first bio's css */ |
| 1762 | #ifdef CONFIG_BLK_CGROUP | 1763 | #ifdef CONFIG_BLK_CGROUP |
| 1763 | if (cmd->use_aio && rq->bio && rq->bio->bi_css) { | 1764 | if (cmd->use_aio && rq->bio && rq->bio->bi_blkg) { |
| 1764 | cmd->css = rq->bio->bi_css; | 1765 | cmd->css = &bio_blkcg(rq->bio)->css; |
| 1765 | css_get(cmd->css); | 1766 | css_get(cmd->css); |
| 1766 | } else | 1767 | } else |
| 1767 | #endif | 1768 | #endif |
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index ac1cffd2a09b..f3fb5bb8c82a 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
| @@ -542,7 +542,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio) | |||
| 542 | !discard_bio) | 542 | !discard_bio) |
| 543 | continue; | 543 | continue; |
| 544 | bio_chain(discard_bio, bio); | 544 | bio_chain(discard_bio, bio); |
| 545 | bio_clone_blkcg_association(discard_bio, bio); | 545 | bio_clone_blkg_association(discard_bio, bio); |
| 546 | if (mddev->gendisk) | 546 | if (mddev->gendisk) |
| 547 | trace_block_bio_remap(bdev_get_queue(rdev->bdev), | 547 | trace_block_bio_remap(bdev_get_queue(rdev->bdev), |
| 548 | discard_bio, disk_devt(mddev->gendisk), | 548 | discard_bio, disk_devt(mddev->gendisk), |
