Skip to content

Commit 8a8e6f8

Browse files
committed
md/raid0: attach correct cgroup info in bio
The discard bio doesn't attach the original bio cgroup info. Normal bio is cloned, so is fine. Signed-off-by: Shaohua Li <[email protected]>
1 parent b5e0fff commit 8a8e6f8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

block/bio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,7 +2085,7 @@ void bio_clone_blkcg_association(struct bio *dst, struct bio *src)
20852085
if (src->bi_css)
20862086
WARN_ON(bio_associate_blkcg(dst, src->bi_css));
20872087
}
2088-
2088+
EXPORT_SYMBOL_GPL(bio_clone_blkcg_association);
20892089
#endif /* CONFIG_BLK_CGROUP */
20902090

20912091
static void __init biovec_init_slabs(void)

drivers/md/raid0.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ static void raid0_handle_discard(struct mddev *mddev, struct bio *bio)
539539
!discard_bio)
540540
continue;
541541
bio_chain(discard_bio, bio);
542+
bio_clone_blkcg_association(discard_bio, bio);
542543
if (mddev->gendisk)
543544
trace_block_bio_remap(bdev_get_queue(rdev->bdev),
544545
discard_bio, disk_devt(mddev->gendisk),

0 commit comments

Comments
 (0)