From: Jens Axboe Date: Thu, 15 May 2008 11:01:14 +0000 (+0200) Subject: read-ahead: use plugging X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=refs%2Fheads%2Fplug;p=linux-2.6-block.git read-ahead: use plugging Signed-off-by: Jens Axboe --- diff --git a/mm/readahead.c b/mm/readahead.c index cbddc3e17246..443dd1b57f99 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -112,6 +112,8 @@ static int read_pages(struct address_space *mapping, struct file *filp, unsigned page_idx; int ret; + blk_plug_current(); + if (mapping->a_ops->readpages) { ret = mapping->a_ops->readpages(filp, mapping, pages, nr_pages); /* Clean up the remaining pages */ @@ -129,7 +131,10 @@ static int read_pages(struct address_space *mapping, struct file *filp, page_cache_release(page); } ret = 0; + out: + blk_unplug_current(); + return ret; }