diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-05 04:50:33 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-01-05 04:50:33 -0500 |
commit | 353816f43d1fb340ff2d9a911dd5d0799c09f6a5 (patch) | |
tree | 517290fd884d286fe2971137ac89f89e3567785a /mm/bounce.c | |
parent | 160bbab3000dafccbe43688e48208cecf4deb879 (diff) | |
parent | fe0bdec68b77020281dc814805edfe594ae89e0f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/poodle.c
arch/arm/mach-pxa/spitz.c
Diffstat (limited to 'mm/bounce.c')
-rw-r--r-- | mm/bounce.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mm/bounce.c b/mm/bounce.c index 06722c403058..e590272fe7a8 100644 --- a/mm/bounce.c +++ b/mm/bounce.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/hash.h> | 14 | #include <linux/hash.h> |
15 | #include <linux/highmem.h> | 15 | #include <linux/highmem.h> |
16 | #include <linux/blktrace_api.h> | 16 | #include <linux/blktrace_api.h> |
17 | #include <trace/block.h> | ||
17 | #include <asm/tlbflush.h> | 18 | #include <asm/tlbflush.h> |
18 | 19 | ||
19 | #define POOL_SIZE 64 | 20 | #define POOL_SIZE 64 |
@@ -21,6 +22,8 @@ | |||
21 | 22 | ||
22 | static mempool_t *page_pool, *isa_page_pool; | 23 | static mempool_t *page_pool, *isa_page_pool; |
23 | 24 | ||
25 | DEFINE_TRACE(block_bio_bounce); | ||
26 | |||
24 | #ifdef CONFIG_HIGHMEM | 27 | #ifdef CONFIG_HIGHMEM |
25 | static __init int init_emergency_pool(void) | 28 | static __init int init_emergency_pool(void) |
26 | { | 29 | { |
@@ -195,8 +198,13 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, | |||
195 | /* | 198 | /* |
196 | * irk, bounce it | 199 | * irk, bounce it |
197 | */ | 200 | */ |
198 | if (!bio) | 201 | if (!bio) { |
199 | bio = bio_alloc(GFP_NOIO, (*bio_orig)->bi_vcnt); | 202 | unsigned int cnt = (*bio_orig)->bi_vcnt; |
203 | |||
204 | bio = bio_alloc(GFP_NOIO, cnt); | ||
205 | memset(bio->bi_io_vec, 0, cnt * sizeof(struct bio_vec)); | ||
206 | } | ||
207 | |||
200 | 208 | ||
201 | to = bio->bi_io_vec + i; | 209 | to = bio->bi_io_vec + i; |
202 | 210 | ||
@@ -222,7 +230,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, | |||
222 | if (!bio) | 230 | if (!bio) |
223 | return; | 231 | return; |
224 | 232 | ||
225 | blk_add_trace_bio(q, *bio_orig, BLK_TA_BOUNCE); | 233 | trace_block_bio_bounce(q, *bio_orig); |
226 | 234 | ||
227 | /* | 235 | /* |
228 | * at least one page was bounced, fill in possible non-highmem | 236 | * at least one page was bounced, fill in possible non-highmem |