btrfs: fix compile when block cgroups are not enabled
[firefly-linux-kernel-4.4.55.git] / fs / btrfs / extent_io.c
index 3cfbd6261f9b2bc92a372d402ea241d5a41c7748..fa19f2f68c1b661a6fd65fdf777f7d16efc01ce4 100644 (file)
@@ -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;
 }