aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs/ore.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exofs/ore.c')
-rw-r--r--fs/exofs/ore.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/exofs/ore.c b/fs/exofs/ore.c
index 1585db1aa365..f936cb50dc0d 100644
--- a/fs/exofs/ore.c
+++ b/fs/exofs/ore.c
@@ -814,8 +814,8 @@ static int _write_mirror(struct ore_io_state *ios, int cur_comp)
814 struct bio *bio; 814 struct bio *bio;
815 815
816 if (per_dev != master_dev) { 816 if (per_dev != master_dev) {
817 bio = bio_kmalloc(GFP_KERNEL, 817 bio = bio_clone_kmalloc(master_dev->bio,
818 master_dev->bio->bi_max_vecs); 818 GFP_KERNEL);
819 if (unlikely(!bio)) { 819 if (unlikely(!bio)) {
820 ORE_DBGMSG( 820 ORE_DBGMSG(
821 "Failed to allocate BIO size=%u\n", 821 "Failed to allocate BIO size=%u\n",
@@ -824,7 +824,6 @@ static int _write_mirror(struct ore_io_state *ios, int cur_comp)
824 goto out; 824 goto out;
825 } 825 }
826 826
827 __bio_clone(bio, master_dev->bio);
828 bio->bi_bdev = NULL; 827 bio->bi_bdev = NULL;
829 bio->bi_next = NULL; 828 bio->bi_next = NULL;
830 per_dev->offset = master_dev->offset; 829 per_dev->offset = master_dev->offset;