summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2015-08-21 10:05:39 -0700
committerChris Mason <clm@fb.com>2015-08-21 10:08:13 -0700
commit3a9508b0221dfd290b95fb0ab199958fe078bbdf (patch)
treef7e25d8cbfe0e3d5f4a052cc42675351d09e5c9c /fs/btrfs/extent_io.c
parentb84b8390d6009cde5134f775a251103c14bbed74 (diff)
btrfs: fix compile when block cgroups are not enabled
bio->bi_css and bio->bi_ioc don't exist when block cgroups are not on. This adds an ifdef around them. It's not perfect, but our use of bi_ioc is being removed in the 4.3 merge window. The bi_css usage really should go into bio_clone, but I want to make sure that doesn't introduce problems for other bio_clone use cases. Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3cfbd6261f9b..fa19f2f68c1b 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;
}