diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 6cd2c313e800..c6ee491d98e7 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -264,14 +264,14 @@ static int linear_stop (mddev_t *mddev) | |||
264 | return 0; | 264 | return 0; |
265 | } | 265 | } |
266 | 266 | ||
267 | static int linear_make_request (mddev_t *mddev, struct bio *bio) | 267 | static void linear_make_request (mddev_t *mddev, struct bio *bio) |
268 | { | 268 | { |
269 | dev_info_t *tmp_dev; | 269 | dev_info_t *tmp_dev; |
270 | sector_t start_sector; | 270 | sector_t start_sector; |
271 | 271 | ||
272 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { | 272 | if (unlikely(bio->bi_rw & REQ_FLUSH)) { |
273 | md_flush_request(mddev, bio); | 273 | md_flush_request(mddev, bio); |
274 | return 0; | 274 | return; |
275 | } | 275 | } |
276 | 276 | ||
277 | rcu_read_lock(); | 277 | rcu_read_lock(); |
@@ -293,7 +293,7 @@ static int linear_make_request (mddev_t *mddev, struct bio *bio) | |||
293 | (unsigned long long)start_sector); | 293 | (unsigned long long)start_sector); |
294 | rcu_read_unlock(); | 294 | rcu_read_unlock(); |
295 | bio_io_error(bio); | 295 | bio_io_error(bio); |
296 | return 0; | 296 | return; |
297 | } | 297 | } |
298 | if (unlikely(bio->bi_sector + (bio->bi_size >> 9) > | 298 | if (unlikely(bio->bi_sector + (bio->bi_size >> 9) > |
299 | tmp_dev->end_sector)) { | 299 | tmp_dev->end_sector)) { |
@@ -307,20 +307,17 @@ static int linear_make_request (mddev_t *mddev, struct bio *bio) | |||
307 | 307 | ||
308 | bp = bio_split(bio, end_sector - bio->bi_sector); | 308 | bp = bio_split(bio, end_sector - bio->bi_sector); |
309 | 309 | ||
310 | if (linear_make_request(mddev, &bp->bio1)) | 310 | linear_make_request(mddev, &bp->bio1); |
311 | generic_make_request(&bp->bio1); | 311 | linear_make_request(mddev, &bp->bio2); |
312 | if (linear_make_request(mddev, &bp->bio2)) | ||
313 | generic_make_request(&bp->bio2); | ||
314 | bio_pair_release(bp); | 312 | bio_pair_release(bp); |
315 | return 0; | 313 | return; |
316 | } | 314 | } |
317 | 315 | ||
318 | bio->bi_bdev = tmp_dev->rdev->bdev; | 316 | bio->bi_bdev = tmp_dev->rdev->bdev; |
319 | bio->bi_sector = bio->bi_sector - start_sector | 317 | bio->bi_sector = bio->bi_sector - start_sector |
320 | + tmp_dev->rdev->data_offset; | 318 | + tmp_dev->rdev->data_offset; |
321 | rcu_read_unlock(); | 319 | rcu_read_unlock(); |
322 | 320 | generic_make_request(bio); | |
323 | return 1; | ||
324 | } | 321 | } |
325 | 322 | ||
326 | static void linear_status (struct seq_file *seq, mddev_t *mddev) | 323 | static void linear_status (struct seq_file *seq, mddev_t *mddev) |