aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.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/volumes.c
parentBtrfs: fix file read corruption after extent cloning and fsync (diff)
downloadlinux-dev-3a9508b0221dfd290b95fb0ab199958fe078bbdf.tar.xz
linux-dev-3a9508b0221dfd290b95fb0ab199958fe078bbdf.zip
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/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 53a38075911e..69520dfa8960 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5955,6 +5955,7 @@ again:
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 @@ again:
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) {