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.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 924dd90a4cf5..06843d24f239 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -51,7 +51,7 @@ static struct page *ecryptfs_get1page(struct file *file, int index)
51 struct inode *inode; 51 struct inode *inode;
52 struct address_space *mapping; 52 struct address_space *mapping;
53 53
54 dentry = file->f_dentry; 54 dentry = file->f_path.dentry;
55 inode = dentry->d_inode; 55 inode = dentry->d_inode;
56 mapping = inode->i_mapping; 56 mapping = inode->i_mapping;
57 page = read_cache_page(mapping, index, 57 page = read_cache_page(mapping, index,
@@ -84,7 +84,7 @@ int write_zeros(struct file *file, pgoff_t index, int start, int num_zeros);
84int ecryptfs_fill_zeros(struct file *file, loff_t new_length) 84int ecryptfs_fill_zeros(struct file *file, loff_t new_length)
85{ 85{
86 int rc = 0; 86 int rc = 0;
87 struct dentry *dentry = file->f_dentry; 87 struct dentry *dentry = file->f_path.dentry;
88 struct inode *inode = dentry->d_inode; 88 struct inode *inode = dentry->d_inode;
89 pgoff_t old_end_page_index = 0; 89 pgoff_t old_end_page_index = 0;
90 pgoff_t index = old_end_page_index; 90 pgoff_t index = old_end_page_index;
@@ -218,7 +218,7 @@ int ecryptfs_do_readpage(struct file *file, struct page *page,
218 char *lower_page_data; 218 char *lower_page_data;
219 const struct address_space_operations *lower_a_ops; 219 const struct address_space_operations *lower_a_ops;
220 220
221 dentry = file->f_dentry; 221 dentry = file->f_path.dentry;
222 lower_file = ecryptfs_file_to_lower(file); 222 lower_file = ecryptfs_file_to_lower(file);
223 lower_dentry = ecryptfs_dentry_to_lower(dentry); 223 lower_dentry = ecryptfs_dentry_to_lower(dentry);
224 inode = dentry->d_inode; 224 inode = dentry->d_inode;
@@ -275,9 +275,9 @@ static int ecryptfs_readpage(struct file *file, struct page *page)
275 int rc = 0; 275 int rc = 0;
276 struct ecryptfs_crypt_stat *crypt_stat; 276 struct ecryptfs_crypt_stat *crypt_stat;
277 277
278 BUG_ON(!(file && file->f_dentry && file->f_dentry->d_inode)); 278 BUG_ON(!(file && file->f_path.dentry && file->f_path.dentry->d_inode));
279 crypt_stat = 279 crypt_stat = &ecryptfs_inode_to_private(file->f_path.dentry->d_inode)
280 &ecryptfs_inode_to_private(file->f_dentry->d_inode)->crypt_stat; 280 ->crypt_stat;
281 if (!crypt_stat 281 if (!crypt_stat
282 || !ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_ENCRYPTED) 282 || !ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_ENCRYPTED)
283 || ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE)) { 283 || ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE)) {
@@ -638,8 +638,8 @@ static int ecryptfs_commit_write(struct file *file, struct page *page,
638 lower_inode = ecryptfs_inode_to_lower(inode); 638 lower_inode = ecryptfs_inode_to_lower(inode);
639 lower_file = ecryptfs_file_to_lower(file); 639 lower_file = ecryptfs_file_to_lower(file);
640 mutex_lock(&lower_inode->i_mutex); 640 mutex_lock(&lower_inode->i_mutex);
641 crypt_stat = 641 crypt_stat = &ecryptfs_inode_to_private(file->f_path.dentry->d_inode)
642 &ecryptfs_inode_to_private(file->f_dentry->d_inode)->crypt_stat; 642 ->crypt_stat;
643 if (ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE)) { 643 if (ECRYPTFS_CHECK_FLAG(crypt_stat->flags, ECRYPTFS_NEW_FILE)) {
644 ecryptfs_printk(KERN_DEBUG, "ECRYPTFS_NEW_FILE flag set in " 644 ecryptfs_printk(KERN_DEBUG, "ECRYPTFS_NEW_FILE flag set in "
645 "crypt_stat at memory location [%p]\n", crypt_stat); 645 "crypt_stat at memory location [%p]\n", crypt_stat);