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.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index 6a44148c5fb9..a46b3a8fee1e 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -57,6 +57,10 @@ struct page *ecryptfs_get_locked_page(struct inode *inode, loff_t index)
57 * @page: Page that is locked before this call is made 57 * @page: Page that is locked before this call is made
58 * 58 *
59 * Returns zero on success; non-zero otherwise 59 * Returns zero on success; non-zero otherwise
60 *
61 * This is where we encrypt the data and pass the encrypted data to
62 * the lower filesystem. In OpenPGP-compatible mode, we operate on
63 * entire underlying packets.
60 */ 64 */
61static int ecryptfs_writepage(struct page *page, struct writeback_control *wbc) 65static int ecryptfs_writepage(struct page *page, struct writeback_control *wbc)
62{ 66{
@@ -146,7 +150,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
146 /* This is a header extent */ 150 /* This is a header extent */
147 char *page_virt; 151 char *page_virt;
148 152
149 page_virt = kmap_atomic(page, KM_USER0); 153 page_virt = kmap_atomic(page);
150 memset(page_virt, 0, PAGE_CACHE_SIZE); 154 memset(page_virt, 0, PAGE_CACHE_SIZE);
151 /* TODO: Support more than one header extent */ 155 /* TODO: Support more than one header extent */
152 if (view_extent_num == 0) { 156 if (view_extent_num == 0) {
@@ -159,7 +163,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
159 crypt_stat, 163 crypt_stat,
160 &written); 164 &written);
161 } 165 }
162 kunmap_atomic(page_virt, KM_USER0); 166 kunmap_atomic(page_virt);
163 flush_dcache_page(page); 167 flush_dcache_page(page);
164 if (rc) { 168 if (rc) {
165 printk(KERN_ERR "%s: Error reading xattr " 169 printk(KERN_ERR "%s: Error reading xattr "
@@ -481,10 +485,6 @@ int ecryptfs_write_inode_size_to_metadata(struct inode *ecryptfs_inode)
481 * @copied: The amount of data copied 485 * @copied: The amount of data copied
482 * @page: The eCryptfs page 486 * @page: The eCryptfs page
483 * @fsdata: The fsdata (unused) 487 * @fsdata: The fsdata (unused)
484 *
485 * This is where we encrypt the data and pass the encrypted data to
486 * the lower filesystem. In OpenPGP-compatible mode, we operate on
487 * entire underlying packets.
488 */ 488 */
489static int ecryptfs_write_end(struct file *file, 489static int ecryptfs_write_end(struct file *file,
490 struct address_space *mapping, 490 struct address_space *mapping,