diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3cfbd6261f9b2bc92a372d402ea241d5a41c7748..fa19f2f68c1b661a6fd65fdf777f7d16efc01ce4 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2730,9 +2730,12 @@ struct bio *btrfs_bio_clone(struct bio *bio, gfp_t gfp_mask) btrfs_bio->csum = NULL; btrfs_bio->csum_allocated = NULL; btrfs_bio->end_io = NULL; + +#ifdef CONFIG_BLK_CGROUP /* FIXME, put this into bio_clone_bioset */ if (bio->bi_css) bio_associate_blkcg(new, bio->bi_css); +#endif } return new; } diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 53a38075911e142ba867a638eb53991b25162a5c..69520dfa8960d0dd3539a260bec8c22d57f680e1 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -5955,6 +5955,7 @@ static int breakup_stripe_bio(struct btrfs_root *root, struct btrfs_bio *bbio, if (!bio) return -ENOMEM; +#ifdef CONFIG_BLK_CGROUP if (first_bio->bi_ioc) { get_io_context_active(first_bio->bi_ioc); bio->bi_ioc = first_bio->bi_ioc; @@ -5963,6 +5964,7 @@ static int breakup_stripe_bio(struct btrfs_root *root, struct btrfs_bio *bbio, css_get(first_bio->bi_css); bio->bi_css = first_bio->bi_css; } +#endif while (bvec <= (first_bio->bi_io_vec + first_bio->bi_vcnt - 1)) { if (bio_add_page(bio, bvec->bv_page, bvec->bv_len, bvec->bv_offset) < bvec->bv_len) {