]> Pileus Git - ~andy/linux/blobdiff - fs/ecryptfs/mmap.c
Merge branch 'stable/swiotlb-0.8.3' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / fs / ecryptfs / mmap.c
index 14e81c26c3ed54f62b6e13187a9ea8079caac884..b1d82756544be763e9841a21a0c63c7bdc20db82 100644 (file)
  * Returns locked and up-to-date page (if ok), with increased
  * refcnt.
  */
-struct page *ecryptfs_get_locked_page(struct file *file, loff_t index)
+struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index)
 {
-       struct dentry *dentry;
-       struct inode *inode;
-       struct address_space *mapping;
-       struct page *page;
-
-       dentry = file->f_path.dentry;
-       inode = dentry->d_inode;
-       mapping = inode->i_mapping;
-       page = read_mapping_page(mapping, index, (void *)file);
+       struct page *page = read_mapping_page(inode->i_mapping, index, NULL);
        if (!IS_ERR(page))
                lock_page(page);
        return page;