diff options
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 6c10f28bc25e..bbe0b817572b 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -139,7 +139,7 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data) | |||
139 | out_free_pages: | 139 | out_free_pages: |
140 | for (i=0; i < RESYNC_PAGES ; i++) | 140 | for (i=0; i < RESYNC_PAGES ; i++) |
141 | for (j=0 ; j < pi->raid_disks; j++) | 141 | for (j=0 ; j < pi->raid_disks; j++) |
142 | __free_page(r1_bio->bios[j]->bi_io_vec[i].bv_page); | 142 | put_page(r1_bio->bios[j]->bi_io_vec[i].bv_page); |
143 | j = -1; | 143 | j = -1; |
144 | out_free_bio: | 144 | out_free_bio: |
145 | while ( ++j < pi->raid_disks ) | 145 | while ( ++j < pi->raid_disks ) |
@@ -159,7 +159,7 @@ static void r1buf_pool_free(void *__r1_bio, void *data) | |||
159 | if (j == 0 || | 159 | if (j == 0 || |
160 | r1bio->bios[j]->bi_io_vec[i].bv_page != | 160 | r1bio->bios[j]->bi_io_vec[i].bv_page != |
161 | r1bio->bios[0]->bi_io_vec[i].bv_page) | 161 | r1bio->bios[0]->bi_io_vec[i].bv_page) |
162 | __free_page(r1bio->bios[j]->bi_io_vec[i].bv_page); | 162 | put_page(r1bio->bios[j]->bi_io_vec[i].bv_page); |
163 | } | 163 | } |
164 | for (i=0 ; i < pi->raid_disks; i++) | 164 | for (i=0 ; i < pi->raid_disks; i++) |
165 | bio_put(r1bio->bios[i]); | 165 | bio_put(r1bio->bios[i]); |
@@ -384,7 +384,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int | |||
384 | /* free extra copy of the data pages */ | 384 | /* free extra copy of the data pages */ |
385 | int i = bio->bi_vcnt; | 385 | int i = bio->bi_vcnt; |
386 | while (i--) | 386 | while (i--) |
387 | __free_page(bio->bi_io_vec[i].bv_page); | 387 | put_page(bio->bi_io_vec[i].bv_page); |
388 | } | 388 | } |
389 | /* clear the bitmap if all writes complete successfully */ | 389 | /* clear the bitmap if all writes complete successfully */ |
390 | bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector, | 390 | bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector, |
@@ -733,7 +733,7 @@ static struct page **alloc_behind_pages(struct bio *bio) | |||
733 | do_sync_io: | 733 | do_sync_io: |
734 | if (pages) | 734 | if (pages) |
735 | for (i = 0; i < bio->bi_vcnt && pages[i]; i++) | 735 | for (i = 0; i < bio->bi_vcnt && pages[i]; i++) |
736 | __free_page(pages[i]); | 736 | put_page(pages[i]); |
737 | kfree(pages); | 737 | kfree(pages); |
738 | PRINTK("%dB behind alloc failed, doing sync I/O\n", bio->bi_size); | 738 | PRINTK("%dB behind alloc failed, doing sync I/O\n", bio->bi_size); |
739 | return NULL; | 739 | return NULL; |
@@ -1893,7 +1893,7 @@ out_free_conf: | |||
1893 | if (conf->r1bio_pool) | 1893 | if (conf->r1bio_pool) |
1894 | mempool_destroy(conf->r1bio_pool); | 1894 | mempool_destroy(conf->r1bio_pool); |
1895 | kfree(conf->mirrors); | 1895 | kfree(conf->mirrors); |
1896 | __free_page(conf->tmppage); | 1896 | put_page(conf->tmppage); |
1897 | kfree(conf->poolinfo); | 1897 | kfree(conf->poolinfo); |
1898 | kfree(conf); | 1898 | kfree(conf); |
1899 | mddev->private = NULL; | 1899 | mddev->private = NULL; |