diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-04-07 06:05:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-07 06:05:25 -0400 |
commit | 6c009ecef8cca28c7c09eb16d0802e37915a76e1 (patch) | |
tree | 11c773f780186fdb9fbc9c80a73fb7c8426b1fba /drivers/md/raid1.c | |
parent | 98c2aaf8be5baf7193be37fb28bce8e7327158bc (diff) | |
parent | d508afb437daee7cf07da085b635c44a4ebf9b38 (diff) |
Merge branch 'linus' into perfcounters/core
Merge reason: need the upstream facility added by:
7f1e2ca: hrtimer: fix rq->lock inversion (again)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r-- | drivers/md/raid1.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index b4f4badc0068..274b491a11c1 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -123,6 +123,7 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data) | |||
123 | goto out_free_pages; | 123 | goto out_free_pages; |
124 | 124 | ||
125 | bio->bi_io_vec[i].bv_page = page; | 125 | bio->bi_io_vec[i].bv_page = page; |
126 | bio->bi_vcnt = i+1; | ||
126 | } | 127 | } |
127 | } | 128 | } |
128 | /* If not user-requests, copy the page pointers to all bios */ | 129 | /* If not user-requests, copy the page pointers to all bios */ |
@@ -138,9 +139,9 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data) | |||
138 | return r1_bio; | 139 | return r1_bio; |
139 | 140 | ||
140 | out_free_pages: | 141 | out_free_pages: |
141 | for (i=0; i < RESYNC_PAGES ; i++) | 142 | for (j=0 ; j < pi->raid_disks; j++) |
142 | for (j=0 ; j < pi->raid_disks; j++) | 143 | for (i=0; i < r1_bio->bios[j]->bi_vcnt ; i++) |
143 | safe_put_page(r1_bio->bios[j]->bi_io_vec[i].bv_page); | 144 | put_page(r1_bio->bios[j]->bi_io_vec[i].bv_page); |
144 | j = -1; | 145 | j = -1; |
145 | out_free_bio: | 146 | out_free_bio: |
146 | while ( ++j < pi->raid_disks ) | 147 | while ( ++j < pi->raid_disks ) |
@@ -585,7 +586,7 @@ static int raid1_congested(void *data, int bits) | |||
585 | /* Note the '|| 1' - when read_balance prefers | 586 | /* Note the '|| 1' - when read_balance prefers |
586 | * non-congested targets, it can be removed | 587 | * non-congested targets, it can be removed |
587 | */ | 588 | */ |
588 | if ((bits & (1<<BDI_write_congested)) || 1) | 589 | if ((bits & (1<<BDI_async_congested)) || 1) |
589 | ret |= bdi_congested(&q->backing_dev_info, bits); | 590 | ret |= bdi_congested(&q->backing_dev_info, bits); |
590 | else | 591 | else |
591 | ret &= bdi_congested(&q->backing_dev_info, bits); | 592 | ret &= bdi_congested(&q->backing_dev_info, bits); |