aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/inode.c
diff options
context:
space:
mode:
authorMichael Halcrow <mhalcrow@us.ibm.com>2007-10-16 04:28:08 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:12 -0400
commit0216f7f7921759211e48e8b940eae29f0fe43902 (patch)
tree44999b1dfb49944bfd83881c8d9e0cbe3a90e2b7 /fs/ecryptfs/inode.c
parentda0102a10aed2244d8fc34f289e81e502622b81e (diff)
eCryptfs: replace encrypt, decrypt, and inode size write
Replace page encryption and decryption routines and inode size write routine with versions that utilize the read_write.c functions. Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs/inode.c')
-rw-r--r--fs/ecryptfs/inode.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index d70f5994ba5..7192a810bbe 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;
175out: 173out:
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; "