From 8161cb90893a3d6e4c84b288d0bd2ba5b1d7a1ed Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 15 May 2008 13:01:14 +0200 Subject: [PATCH] read-ahead: use plugging Signed-off-by: Jens Axboe --- mm/readahead.c | 5 +++++ 1 file changed, 5 insertions(+) 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; } -- 2.25.1