summaryrefslogtreecommitdiff
path: root/fs/ecryptfs/read_write.c
diff options
context:
space:
mode:
authorMichael Halcrow <mhalcrow@us.ibm.com>2007-10-16 12:28:08 +0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 20:43:12 +0400
commit0216f7f7921759211e48e8b940eae29f0fe43902 (patch)
tree44999b1dfb49944bfd83881c8d9e0cbe3a90e2b7 /fs/ecryptfs/read_write.c
parentda0102a10aed2244d8fc34f289e81e502622b81e (diff)
downloadlinux-0216f7f7921759211e48e8b940eae29f0fe43902.tar.xz
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/read_write.c')
-rw-r--r--fs/ecryptfs/read_write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c
index e59c94add127..ccd2599e0a4f 100644
--- a/fs/ecryptfs/read_write.c
+++ b/fs/ecryptfs/read_write.c
@@ -154,8 +154,8 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
/* Read in the page from the lower
* into the eCryptfs inode page cache,
* decrypting */
- if ((rc = ecryptfs_decrypt_page(NULL, /* placeholder for git-bisect */
- ecryptfs_page))) {
+ rc = ecryptfs_decrypt_page(ecryptfs_page);
+ if (rc) {
printk(KERN_ERR "%s: Error decrypting "
"page; rc = [%d]\n",
__FUNCTION__, rc);
@@ -178,7 +178,7 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
}
kunmap_atomic(ecryptfs_page_virt, KM_USER0);
flush_dcache_page(ecryptfs_page);
- rc = ecryptfs_encrypt_page(NULL /* placeholder for git-bisect */);
+ rc = ecryptfs_encrypt_page(ecryptfs_page);
if (rc) {
printk(KERN_ERR "%s: Error encrypting "
"page; rc = [%d]\n", __FUNCTION__, rc);
@@ -190,8 +190,8 @@ int ecryptfs_write(struct file *ecryptfs_file, char *data, loff_t offset,
}
if ((offset + size) > ecryptfs_file_size) {
i_size_write(ecryptfs_file->f_dentry->d_inode, (offset + size));
- rc = ecryptfs_write_inode_size_to_metadata(NULL, NULL, NULL,
- NULL, 0); /* placeholders for git-bisect */
+ rc = ecryptfs_write_inode_size_to_metadata(
+ ecryptfs_file->f_dentry->d_inode);
if (rc) {
printk(KERN_ERR "Problem with "
"ecryptfs_write_inode_size_to_metadata; "
@@ -338,7 +338,7 @@ int ecryptfs_read(char *data, loff_t offset, size_t size,
ecryptfs_page_idx, rc);
goto out;
}
- rc = ecryptfs_decrypt_page(NULL /* placeholder for git-bisect */, ecryptfs_page);
+ rc = ecryptfs_decrypt_page(ecryptfs_page);
if (rc) {
printk(KERN_ERR "%s: Error decrypting "
"page; rc = [%d]\n", __FUNCTION__, rc);