diff options
author | Tony Lindgren <tony@atomide.com> | 2014-03-02 17:22:03 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-03-02 17:22:03 -0500 |
commit | f777ba1780584b100ab9664cc06d04f3bb273a84 (patch) | |
tree | 865813eb0078530ca3b036c0c3eee6ce33f9315f /fs/bio.c | |
parent | f68e355c86cff91e5266cf937ea24fcba0641900 (diff) | |
parent | 1a5fe3ca5ea192d4309dd61f3626b79ff38693c2 (diff) |
Merge tag 'for_3.15/dts_signed' of git://git.kernel.org/pub/scm/linux/kernel/git/bcousson/linux-omap-dt into omap-for-v3.15/dt
Add craneboard devices
Add more N900 devices
Add am43x-epos-evm and am437x-gp-evm devices
Add OMAP4 DMM devices
Conflicts:
arch/arm/boot/dts/am43x-epos-evm.dts
arch/arm/boot/dts/dra7.dtsi
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -611,7 +611,6 @@ EXPORT_SYMBOL(bio_clone_fast); | |||
611 | struct bio *bio_clone_bioset(struct bio *bio_src, gfp_t gfp_mask, | 611 | struct bio *bio_clone_bioset(struct bio *bio_src, gfp_t gfp_mask, |
612 | struct bio_set *bs) | 612 | struct bio_set *bs) |
613 | { | 613 | { |
614 | unsigned nr_iovecs = 0; | ||
615 | struct bvec_iter iter; | 614 | struct bvec_iter iter; |
616 | struct bio_vec bv; | 615 | struct bio_vec bv; |
617 | struct bio *bio; | 616 | struct bio *bio; |
@@ -638,10 +637,7 @@ struct bio *bio_clone_bioset(struct bio *bio_src, gfp_t gfp_mask, | |||
638 | * __bio_clone_fast() anyways. | 637 | * __bio_clone_fast() anyways. |
639 | */ | 638 | */ |
640 | 639 | ||
641 | bio_for_each_segment(bv, bio_src, iter) | 640 | bio = bio_alloc_bioset(gfp_mask, bio_segments(bio_src), bs); |
642 | nr_iovecs++; | ||
643 | |||
644 | bio = bio_alloc_bioset(gfp_mask, nr_iovecs, bs); | ||
645 | if (!bio) | 641 | if (!bio) |
646 | return NULL; | 642 | return NULL; |
647 | 643 | ||
@@ -650,9 +646,18 @@ struct bio *bio_clone_bioset(struct bio *bio_src, gfp_t gfp_mask, | |||
650 | bio->bi_iter.bi_sector = bio_src->bi_iter.bi_sector; | 646 | bio->bi_iter.bi_sector = bio_src->bi_iter.bi_sector; |
651 | bio->bi_iter.bi_size = bio_src->bi_iter.bi_size; | 647 | bio->bi_iter.bi_size = bio_src->bi_iter.bi_size; |
652 | 648 | ||
649 | if (bio->bi_rw & REQ_DISCARD) | ||
650 | goto integrity_clone; | ||
651 | |||
652 | if (bio->bi_rw & REQ_WRITE_SAME) { | ||
653 | bio->bi_io_vec[bio->bi_vcnt++] = bio_src->bi_io_vec[0]; | ||
654 | goto integrity_clone; | ||
655 | } | ||
656 | |||
653 | bio_for_each_segment(bv, bio_src, iter) | 657 | bio_for_each_segment(bv, bio_src, iter) |
654 | bio->bi_io_vec[bio->bi_vcnt++] = bv; | 658 | bio->bi_io_vec[bio->bi_vcnt++] = bv; |
655 | 659 | ||
660 | integrity_clone: | ||
656 | if (bio_integrity(bio_src)) { | 661 | if (bio_integrity(bio_src)) { |
657 | int ret; | 662 | int ret; |
658 | 663 | ||