read-ahead: use plugging plug
authorJens Axboe <jens.axboe@oracle.com>
Thu, 15 May 2008 11:01:14 +0000 (13:01 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 22 Jun 2010 10:31:52 +0000 (12:31 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
mm/readahead.c

index cbddc3e1724671bdf7bc2d9b3d95d54af987538f..443dd1b57f99c1bafe4f14b3477e2071e97385a5 100644 (file)
@@ -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;
 }