]> Pileus Git - ~andy/linux/blobdiff - fs/block_dev.c
block: implement blkdev_readpages
[~andy/linux] / fs / block_dev.c
index f45dbc18dd175891950ddb84fffa2bc6ce0df117..a85fe310fc6feb20a86fcc758d7673fce6b82ef4 100644 (file)
@@ -331,6 +331,12 @@ static int blkdev_readpage(struct file * file, struct page * page)
        return block_read_full_page(page, blkdev_get_block);
 }
 
+static int blkdev_readpages(struct file *file, struct address_space *mapping,
+                       struct list_head *pages, unsigned nr_pages)
+{
+       return mpage_readpages(mapping, pages, nr_pages, blkdev_get_block);
+}
+
 static int blkdev_write_begin(struct file *file, struct address_space *mapping,
                        loff_t pos, unsigned len, unsigned flags,
                        struct page **pagep, void **fsdata)
@@ -1399,6 +1405,7 @@ static int blkdev_releasepage(struct page *page, gfp_t wait)
 
 static const struct address_space_operations def_blk_aops = {
        .readpage       = blkdev_readpage,
+       .readpages      = blkdev_readpages,
        .writepage      = blkdev_writepage,
        .sync_page      = block_sync_page,
        .write_begin    = blkdev_write_begin,