From f64e02fe9bc6a359cab95632b33900094d225ae1 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 8 Apr 2015 00:00:32 -0400 Subject: ext4 crypto: add ext4_mpage_readpages() This takes code from fs/mpage.c and optimizes it for ext4. Its primary reason is to allow us to more easily add encryption to ext4's read path in an efficient manner. Signed-off-by: Theodore Ts'o --- fs/ext4/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/ext4/inode.c') diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index ff0c111e52eb..cd3009152ae2 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2820,7 +2820,7 @@ static int ext4_readpage(struct file *file, struct page *page) ret = ext4_readpage_inline(inode, page); if (ret == -EAGAIN) - return mpage_readpage(page, ext4_get_block); + return ext4_mpage_readpages(page->mapping, NULL, page, 1); return ret; } @@ -2835,7 +2835,7 @@ ext4_readpages(struct file *file, struct address_space *mapping, if (ext4_has_inline_data(inode)) return 0; - return mpage_readpages(mapping, pages, nr_pages, ext4_get_block); + return ext4_mpage_readpages(mapping, pages, NULL, nr_pages); } static void ext4_invalidatepage(struct page *page, unsigned int offset, -- cgit v1.2.3