Commit f2b01f8b authored by Andrew Morton's avatar Andrew Morton Committed by Russell King

[PATCH] use bio_get_nr_vecs() hint for pagecache writeback

Use the bio_get_nr_pages() hint for sizing the BIOs which writeback
allocates.
parent 3209a954
...@@ -430,10 +430,8 @@ mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block, ...@@ -430,10 +430,8 @@ mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block,
alloc_new: alloc_new:
if (bio == NULL) { if (bio == NULL) {
const unsigned __nr_pages = 64; /* FIXME */
bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9), bio = mpage_alloc(bdev, blocks[0] << (blkbits - 9),
__nr_pages, GFP_NOFS|__GFP_HIGH); bio_get_nr_vecs(bdev), GFP_NOFS|__GFP_HIGH);
if (bio == NULL) if (bio == NULL)
goto confused; goto confused;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment