aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8e221a20f5d9..5c2178562c96 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -330,18 +330,17 @@ static DEFINE_SPINLOCK(all_mddevs_lock);
330 * call has finished, the bio has been linked into some internal structure 330 * call has finished, the bio has been linked into some internal structure
331 * and so is visible to ->quiesce(), so we don't need the refcount any more. 331 * and so is visible to ->quiesce(), so we don't need the refcount any more.
332 */ 332 */
333static int md_make_request(struct request_queue *q, struct bio *bio) 333static void md_make_request(struct request_queue *q, struct bio *bio)
334{ 334{
335 const int rw = bio_data_dir(bio); 335 const int rw = bio_data_dir(bio);
336 mddev_t *mddev = q->queuedata; 336 mddev_t *mddev = q->queuedata;
337 int rv;
338 int cpu; 337 int cpu;
339 unsigned int sectors; 338 unsigned int sectors;
340 339
341 if (mddev == NULL || mddev->pers == NULL 340 if (mddev == NULL || mddev->pers == NULL
342 || !mddev->ready) { 341 || !mddev->ready) {
343 bio_io_error(bio); 342 bio_io_error(bio);
344 return 0; 343 return;
345 } 344 }
346 smp_rmb(); /* Ensure implications of 'active' are visible */ 345 smp_rmb(); /* Ensure implications of 'active' are visible */
347 rcu_read_lock(); 346 rcu_read_lock();
@@ -366,7 +365,7 @@ static int md_make_request(struct request_queue *q, struct bio *bio)
366 * go away inside make_request 365 * go away inside make_request
367 */ 366 */
368 sectors = bio_sectors(bio); 367 sectors = bio_sectors(bio);
369 rv = mddev->pers->make_request(mddev, bio); 368 mddev->pers->make_request(mddev, bio);
370 369
371 cpu = part_stat_lock(); 370 cpu = part_stat_lock();
372 part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]); 371 part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
@@ -375,8 +374,6 @@ static int md_make_request(struct request_queue *q, struct bio *bio)
375 374
376 if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended) 375 if (atomic_dec_and_test(&mddev->active_io) && mddev->suspended)
377 wake_up(&mddev->sb_wait); 376 wake_up(&mddev->sb_wait);
378
379 return rv;
380} 377}
381 378
382/* mddev_suspend makes sure no new requests are submitted 379/* mddev_suspend makes sure no new requests are submitted
@@ -475,8 +472,7 @@ static void md_submit_flush_data(struct work_struct *ws)
475 bio_endio(bio, 0); 472 bio_endio(bio, 0);
476 else { 473 else {
477 bio->bi_rw &= ~REQ_FLUSH; 474 bio->bi_rw &= ~REQ_FLUSH;
478 if (mddev->pers->make_request(mddev, bio)) 475 mddev->pers->make_request(mddev, bio);
479 generic_make_request(bio);
480 } 476 }
481 477
482 mddev->flush_bio = NULL; 478 mddev->flush_bio = NULL;