diff options
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r-- | fs/ecryptfs/inode.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index d70f5994ba51..7192a810bbe6 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -168,9 +168,7 @@ static int grow_file(struct dentry *ecryptfs_dentry, struct file *lower_file, | |||
168 | goto out; | 168 | goto out; |
169 | } | 169 | } |
170 | i_size_write(inode, 0); | 170 | i_size_write(inode, 0); |
171 | rc = ecryptfs_write_inode_size_to_metadata(lower_file, lower_inode, | 171 | rc = ecryptfs_write_inode_size_to_metadata(inode); |
172 | inode, ecryptfs_dentry, | ||
173 | ECRYPTFS_LOWER_I_MUTEX_NOT_HELD); | ||
174 | ecryptfs_inode_to_private(inode)->crypt_stat.flags |= ECRYPTFS_NEW_FILE; | 172 | ecryptfs_inode_to_private(inode)->crypt_stat.flags |= ECRYPTFS_NEW_FILE; |
175 | out: | 173 | out: |
176 | return rc; | 174 | return rc; |
@@ -798,9 +796,7 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length) | |||
798 | goto out_fput; | 796 | goto out_fput; |
799 | } | 797 | } |
800 | i_size_write(inode, new_length); | 798 | i_size_write(inode, new_length); |
801 | rc = ecryptfs_write_inode_size_to_metadata( | 799 | rc = ecryptfs_write_inode_size_to_metadata(inode); |
802 | lower_file, lower_dentry->d_inode, inode, dentry, | ||
803 | ECRYPTFS_LOWER_I_MUTEX_NOT_HELD); | ||
804 | if (rc) { | 800 | if (rc) { |
805 | printk(KERN_ERR "Problem with " | 801 | printk(KERN_ERR "Problem with " |
806 | "ecryptfs_write_inode_size_to_metadata; " | 802 | "ecryptfs_write_inode_size_to_metadata; " |
@@ -829,9 +825,7 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length) | |||
829 | } | 825 | } |
830 | } | 826 | } |
831 | vmtruncate(inode, new_length); | 827 | vmtruncate(inode, new_length); |
832 | rc = ecryptfs_write_inode_size_to_metadata( | 828 | rc = ecryptfs_write_inode_size_to_metadata(inode); |
833 | lower_file, lower_dentry->d_inode, inode, dentry, | ||
834 | ECRYPTFS_LOWER_I_MUTEX_NOT_HELD); | ||
835 | if (rc) { | 829 | if (rc) { |
836 | printk(KERN_ERR "Problem with " | 830 | printk(KERN_ERR "Problem with " |
837 | "ecryptfs_write_inode_size_to_metadata; " | 831 | "ecryptfs_write_inode_size_to_metadata; " |