diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-19 09:26:22 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-06-27 20:13:45 +0200 |
commit | 1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32 (patch) | |
tree | 8bc3ecac8a32d96ae3587fbce5dad41e7c4c63f0 /block | |
parent | block: move bounce declarations to block/blk.h (diff) | |
download | linux-1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32.tar.xz linux-1c4bc3ab9a064d98cdf6de6b44f89d5c3757fa32.zip |
block: remove the queue_bounce_pfn helper
Only used inside the bounce code, and opencoding it makes it more obvious
what is going on.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/bounce.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/bounce.c b/block/bounce.c index 36ba44491703..5793c2dc1a15 100644 --- a/block/bounce.c +++ b/block/bounce.c @@ -203,7 +203,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, bio_for_each_segment(from, *bio_orig, iter) { if (i++ < BIO_MAX_PAGES) sectors += from.bv_len >> 9; - if (page_to_pfn(from.bv_page) > queue_bounce_pfn(q)) + if (page_to_pfn(from.bv_page) > q->limits.bounce_pfn) bounce = true; } if (!bounce) @@ -220,7 +220,7 @@ static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, bio_for_each_segment_all(to, bio, i) { struct page *page = to->bv_page; - if (page_to_pfn(page) <= queue_bounce_pfn(q)) + if (page_to_pfn(page) <= q->limits.bounce_pfn) continue; to->bv_page = mempool_alloc(pool, q->bounce_gfp); @@ -272,7 +272,7 @@ void blk_queue_bounce(struct request_queue *q, struct bio **bio_orig) * don't waste time iterating over bio segments */ if (!(q->bounce_gfp & GFP_DMA)) { - if (queue_bounce_pfn(q) >= blk_max_pfn) + if (q->limits.bounce_pfn >= blk_max_pfn) return; pool = page_pool; } else { |