diff options
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -248,19 +248,16 @@ inline void __bio_clone(struct bio *bio, struct bio *bio_src) | |||
248 | { | 248 | { |
249 | request_queue_t *q = bdev_get_queue(bio_src->bi_bdev); | 249 | request_queue_t *q = bdev_get_queue(bio_src->bi_bdev); |
250 | 250 | ||
251 | memcpy(bio->bi_io_vec, bio_src->bi_io_vec, bio_src->bi_max_vecs * sizeof(struct bio_vec)); | 251 | memcpy(bio->bi_io_vec, bio_src->bi_io_vec, |
252 | bio_src->bi_max_vecs * sizeof(struct bio_vec)); | ||
252 | 253 | ||
253 | bio->bi_sector = bio_src->bi_sector; | 254 | bio->bi_sector = bio_src->bi_sector; |
254 | bio->bi_bdev = bio_src->bi_bdev; | 255 | bio->bi_bdev = bio_src->bi_bdev; |
255 | bio->bi_flags |= 1 << BIO_CLONED; | 256 | bio->bi_flags |= 1 << BIO_CLONED; |
256 | bio->bi_rw = bio_src->bi_rw; | 257 | bio->bi_rw = bio_src->bi_rw; |
257 | |||
258 | /* | ||
259 | * notes -- maybe just leave bi_idx alone. assume identical mapping | ||
260 | * for the clone | ||
261 | */ | ||
262 | bio->bi_vcnt = bio_src->bi_vcnt; | 258 | bio->bi_vcnt = bio_src->bi_vcnt; |
263 | bio->bi_size = bio_src->bi_size; | 259 | bio->bi_size = bio_src->bi_size; |
260 | bio->bi_idx = bio_src->bi_idx; | ||
264 | bio_phys_segments(q, bio); | 261 | bio_phys_segments(q, bio); |
265 | bio_hw_segments(q, bio); | 262 | bio_hw_segments(q, bio); |
266 | } | 263 | } |