Hi Neil,

Today's linux-next merge of the md tree got a conflict in fs/bio.c
between commit 4363ac7c13a9 ("block: Implement support for WRITE SAME")
from the block tree and commit 368e564836d3 ("block: makes bio_split
support bio without data") from the md tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    s...@canb.auug.org.au

diff --cc fs/bio.c
index f855e0e,dbb7a6c..0000000
--- a/fs/bio.c
+++ b/fs/bio.c
@@@ -1485,20 -1511,19 +1485,21 @@@ struct bio_pair *bio_split(struct bio *
        bp->bio2.bi_size -= first_sectors << 9;
        bp->bio1.bi_size = first_sectors << 9;
  
-       bp->bv1 = bi->bi_io_vec[0];
-       bp->bv2 = bi->bi_io_vec[0];
- 
-       if (bio_is_rw(bi)) {
-               bp->bv2.bv_offset += first_sectors << 9;
-               bp->bv2.bv_len -= first_sectors << 9;
-               bp->bv1.bv_len = first_sectors << 9;
-       }
+       if (bi->bi_vcnt != 0) {
+               bp->bv1 = bi->bi_io_vec[0];
+               bp->bv2 = bi->bi_io_vec[0];
 -              bp->bv2.bv_offset += first_sectors << 9;
 -              bp->bv2.bv_len -= first_sectors << 9;
 -              bp->bv1.bv_len = first_sectors << 9;
++              if (bio_is_rw(bi)) {
++                      bp->bv2.bv_offset += first_sectors << 9;
++                      bp->bv2.bv_len -= first_sectors << 9;
++                      bp->bv1.bv_len = first_sectors << 9;
++              }
  
-       bp->bio1.bi_io_vec = &bp->bv1;
-       bp->bio2.bi_io_vec = &bp->bv2;
+               bp->bio1.bi_io_vec = &bp->bv1;
+               bp->bio2.bi_io_vec = &bp->bv2;
  
-       bp->bio1.bi_max_vecs = 1;
-       bp->bio2.bi_max_vecs = 1;
+               bp->bio1.bi_max_vecs = 1;
+               bp->bio2.bi_max_vecs = 1;
+       }
  
        bp->bio1.bi_end_io = bio_pair_end_1;
        bp->bio2.bi_end_io = bio_pair_end_2;

Attachment: pgpfkFSiOFuw3.pgp
Description: PGP signature

Reply via email to