diff options
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r-- | fs/ecryptfs/file.c | 14 | ||||
-rw-r--r-- | fs/ecryptfs/inode.c | 4 | ||||
-rw-r--r-- | fs/ecryptfs/mmap.c | 16 |
3 files changed, 17 insertions, 17 deletions
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index c48e4590b110..c5a2e5298f15 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -76,7 +76,7 @@ static loff_t ecryptfs_llseek(struct file *file, loff_t offset, int origin) | |||
76 | } | 76 | } |
77 | ecryptfs_printk(KERN_DEBUG, "new_end_pos = [0x%.16x]\n", new_end_pos); | 77 | ecryptfs_printk(KERN_DEBUG, "new_end_pos = [0x%.16x]\n", new_end_pos); |
78 | if (expanding_file) { | 78 | if (expanding_file) { |
79 | rc = ecryptfs_truncate(file->f_dentry, new_end_pos); | 79 | rc = ecryptfs_truncate(file->f_path.dentry, new_end_pos); |
80 | if (rc) { | 80 | if (rc) { |
81 | rv = rc; | 81 | rv = rc; |
82 | ecryptfs_printk(KERN_ERR, "Error on attempt to " | 82 | ecryptfs_printk(KERN_ERR, "Error on attempt to " |
@@ -117,8 +117,8 @@ static ssize_t ecryptfs_read_update_atime(struct kiocb *iocb, | |||
117 | if (-EIOCBQUEUED == rc) | 117 | if (-EIOCBQUEUED == rc) |
118 | rc = wait_on_sync_kiocb(iocb); | 118 | rc = wait_on_sync_kiocb(iocb); |
119 | if (rc >= 0) { | 119 | if (rc >= 0) { |
120 | lower_dentry = ecryptfs_dentry_to_lower(file->f_dentry); | 120 | lower_dentry = ecryptfs_dentry_to_lower(file->f_path.dentry); |
121 | lower_vfsmount = ecryptfs_dentry_to_lower_mnt(file->f_dentry); | 121 | lower_vfsmount = ecryptfs_dentry_to_lower_mnt(file->f_path.dentry); |
122 | touch_atime(lower_vfsmount, lower_dentry); | 122 | touch_atime(lower_vfsmount, lower_dentry); |
123 | } | 123 | } |
124 | return rc; | 124 | return rc; |
@@ -177,10 +177,10 @@ static int ecryptfs_readdir(struct file *file, void *dirent, filldir_t filldir) | |||
177 | 177 | ||
178 | lower_file = ecryptfs_file_to_lower(file); | 178 | lower_file = ecryptfs_file_to_lower(file); |
179 | lower_file->f_pos = file->f_pos; | 179 | lower_file->f_pos = file->f_pos; |
180 | inode = file->f_dentry->d_inode; | 180 | inode = file->f_path.dentry->d_inode; |
181 | memset(&buf, 0, sizeof(buf)); | 181 | memset(&buf, 0, sizeof(buf)); |
182 | buf.dirent = dirent; | 182 | buf.dirent = dirent; |
183 | buf.dentry = file->f_dentry; | 183 | buf.dentry = file->f_path.dentry; |
184 | buf.filldir = filldir; | 184 | buf.filldir = filldir; |
185 | retry: | 185 | retry: |
186 | buf.filldir_called = 0; | 186 | buf.filldir_called = 0; |
@@ -193,7 +193,7 @@ retry: | |||
193 | goto retry; | 193 | goto retry; |
194 | file->f_pos = lower_file->f_pos; | 194 | file->f_pos = lower_file->f_pos; |
195 | if (rc >= 0) | 195 | if (rc >= 0) |
196 | fsstack_copy_attr_atime(inode, lower_file->f_dentry->d_inode); | 196 | fsstack_copy_attr_atime(inode, lower_file->f_path.dentry->d_inode); |
197 | return rc; | 197 | return rc; |
198 | } | 198 | } |
199 | 199 | ||
@@ -240,7 +240,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file) | |||
240 | int rc = 0; | 240 | int rc = 0; |
241 | struct ecryptfs_crypt_stat *crypt_stat = NULL; | 241 | struct ecryptfs_crypt_stat *crypt_stat = NULL; |
242 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; | 242 | struct ecryptfs_mount_crypt_stat *mount_crypt_stat; |
243 | struct dentry *ecryptfs_dentry = file->f_dentry; | 243 | struct dentry *ecryptfs_dentry = file->f_path.dentry; |
244 | /* Private value of ecryptfs_dentry allocated in | 244 | /* Private value of ecryptfs_dentry allocated in |
245 | * ecryptfs_lookup() */ | 245 | * ecryptfs_lookup() */ |
246 | struct dentry *lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); | 246 | struct dentry *lower_dentry = ecryptfs_dentry_to_lower(ecryptfs_dentry); |
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index c07a937b21ac..11f5e5076aef 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -155,7 +155,7 @@ static int grow_file(struct dentry *ecryptfs_dentry, struct file *lower_file, | |||
155 | struct ecryptfs_file_info tmp_file_info; | 155 | struct ecryptfs_file_info tmp_file_info; |
156 | 156 | ||
157 | memset(&fake_file, 0, sizeof(fake_file)); | 157 | memset(&fake_file, 0, sizeof(fake_file)); |
158 | fake_file.f_dentry = ecryptfs_dentry; | 158 | fake_file.f_path.dentry = ecryptfs_dentry; |
159 | memset(&tmp_file_info, 0, sizeof(tmp_file_info)); | 159 | memset(&tmp_file_info, 0, sizeof(tmp_file_info)); |
160 | ecryptfs_set_file_private(&fake_file, &tmp_file_info); | 160 | ecryptfs_set_file_private(&fake_file, &tmp_file_info); |
161 | ecryptfs_set_file_lower(&fake_file, lower_file); | 161 | ecryptfs_set_file_lower(&fake_file, lower_file); |
@@ -754,7 +754,7 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length) | |||
754 | * the file in the underlying filesystem so that the | 754 | * the file in the underlying filesystem so that the |
755 | * truncation has an effect there as well. */ | 755 | * truncation has an effect there as well. */ |
756 | memset(&fake_ecryptfs_file, 0, sizeof(fake_ecryptfs_file)); | 756 | memset(&fake_ecryptfs_file, 0, sizeof(fake_ecryptfs_file)); |
757 | fake_ecryptfs_file.f_dentry = dentry; | 757 | fake_ecryptfs_file.f_path.dentry = dentry; |
758 | /* Released at out_free: label */ | 758 | /* Released at out_free: label */ |
759 | ecryptfs_set_file_private(&fake_ecryptfs_file, | 759 | ecryptfs_set_file_private(&fake_ecryptfs_file, |
760 | kmem_cache_alloc(ecryptfs_file_info_cache, | 760 | kmem_cache_alloc(ecryptfs_file_info_cache, |
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); | |||
84 | int ecryptfs_fill_zeros(struct file *file, loff_t new_length) | 84 | int 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); |