aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-10-27 00:16:40 -0400
committerNeilBrown <neilb@suse.de>2010-10-28 02:36:11 -0400
commit2b193363ef68667ad717a6723165e0dccf99470f (patch)
treebd45d5186f0edf2b546c4503d794b479d126ad1f /drivers/md/md.c
parent1c4588e9c19cae6209a28c9da2f16a18a610b935 (diff)
md: change type of first arg to sync_page_io.
Currently sync_page_io takes a 'bdev'. Every caller passes 'rdev->bdev'. We will soon want another field out of the rdev in sync_page_io, So just pass the rdev instead of the bdev out of it. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 0b6fa2a1882a..3149bf33f1c5 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -721,8 +721,8 @@ static void bi_complete(struct bio *bio, int error)
721 complete((struct completion*)bio->bi_private); 721 complete((struct completion*)bio->bi_private);
722} 722}
723 723
724int sync_page_io(struct block_device *bdev, sector_t sector, int size, 724int sync_page_io(mdk_rdev_t *rdev, sector_t sector, int size,
725 struct page *page, int rw) 725 struct page *page, int rw)
726{ 726{
727 struct bio *bio = bio_alloc(GFP_NOIO, 1); 727 struct bio *bio = bio_alloc(GFP_NOIO, 1);
728 struct completion event; 728 struct completion event;
@@ -730,7 +730,7 @@ int sync_page_io(struct block_device *bdev, sector_t sector, int size,
730 730
731 rw |= REQ_SYNC | REQ_UNPLUG; 731 rw |= REQ_SYNC | REQ_UNPLUG;
732 732
733 bio->bi_bdev = bdev; 733 bio->bi_bdev = rdev->bdev;
734 bio->bi_sector = sector; 734 bio->bi_sector = sector;
735 bio_add_page(bio, page, size, 0); 735 bio_add_page(bio, page, size, 0);
736 init_completion(&event); 736 init_completion(&event);
@@ -756,7 +756,7 @@ static int read_disk_sb(mdk_rdev_t * rdev, int size)
756 return 0; 756 return 0;
757 757
758 758
759 if (!sync_page_io(rdev->bdev, rdev->sb_start, size, rdev->sb_page, READ)) 759 if (!sync_page_io(rdev, rdev->sb_start, size, rdev->sb_page, READ))
760 goto fail; 760 goto fail;
761 rdev->sb_loaded = 1; 761 rdev->sb_loaded = 1;
762 return 0; 762 return 0;