aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs/mmap.c')
-rw-r--r--fs/ecryptfs/mmap.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index b731b09499cb..0770c4b66f53 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -46,7 +46,6 @@ struct kmem_cache *ecryptfs_lower_page_cache;
46 */ 46 */
47static struct page *ecryptfs_get1page(struct file *file, int index) 47static struct page *ecryptfs_get1page(struct file *file, int index)
48{ 48{
49 struct page *page;
50 struct dentry *dentry; 49 struct dentry *dentry;
51 struct inode *inode; 50 struct inode *inode;
52 struct address_space *mapping; 51 struct address_space *mapping;
@@ -54,14 +53,7 @@ static struct page *ecryptfs_get1page(struct file *file, int index)
54 dentry = file->f_path.dentry; 53 dentry = file->f_path.dentry;
55 inode = dentry->d_inode; 54 inode = dentry->d_inode;
56 mapping = inode->i_mapping; 55 mapping = inode->i_mapping;
57 page = read_cache_page(mapping, index, 56 return read_mapping_page(mapping, index, (void *)file);
58 (filler_t *)mapping->a_ops->readpage,
59 (void *)file);
60 if (IS_ERR(page))
61 goto out;
62 wait_on_page_locked(page);
63out:
64 return page;
65} 57}
66 58
67static 59static
@@ -233,7 +225,6 @@ int ecryptfs_do_readpage(struct file *file, struct page *page,
233 ecryptfs_printk(KERN_ERR, "Error reading from page cache\n"); 225 ecryptfs_printk(KERN_ERR, "Error reading from page cache\n");
234 goto out; 226 goto out;
235 } 227 }
236 wait_on_page_locked(lower_page);
237 page_data = kmap_atomic(page, KM_USER0); 228 page_data = kmap_atomic(page, KM_USER0);
238 lower_page_data = kmap_atomic(lower_page, KM_USER1); 229 lower_page_data = kmap_atomic(lower_page, KM_USER1);
239 memcpy(page_data, lower_page_data, PAGE_CACHE_SIZE); 230 memcpy(page_data, lower_page_data, PAGE_CACHE_SIZE);