Commit 465c9343 authored by Cong Wang's avatar Cong Wang Committed by Tyler Hicks

ecryptfs: remove the second argument of k[un]map_atomic()

Signed-off-by: default avatarCong Wang <amwang@redhat.com>
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
parent 545d6809
...@@ -150,7 +150,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page, ...@@ -150,7 +150,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
/* This is a header extent */ /* This is a header extent */
char *page_virt; char *page_virt;
page_virt = kmap_atomic(page, KM_USER0); page_virt = kmap_atomic(page);
memset(page_virt, 0, PAGE_CACHE_SIZE); memset(page_virt, 0, PAGE_CACHE_SIZE);
/* TODO: Support more than one header extent */ /* TODO: Support more than one header extent */
if (view_extent_num == 0) { if (view_extent_num == 0) {
...@@ -163,7 +163,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page, ...@@ -163,7 +163,7 @@ ecryptfs_copy_up_encrypted_with_header(struct page *page,
crypt_stat, crypt_stat,
&written); &written);
} }
kunmap_atomic(page_virt, KM_USER0); kunmap_atomic(page_virt);
flush_dcache_page(page); flush_dcache_page(page);
if (rc) { if (rc) {
printk(KERN_ERR "%s: Error reading xattr " printk(KERN_ERR "%s: Error reading xattr "
......
...@@ -156,7 +156,7 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset, ...@@ -156,7 +156,7 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset,
ecryptfs_page_idx, rc); ecryptfs_page_idx, rc);
goto out; goto out;
} }
ecryptfs_page_virt = kmap_atomic(ecryptfs_page, KM_USER0); ecryptfs_page_virt = kmap_atomic(ecryptfs_page);
/* /*
* pos: where we're now writing, offset: where the request was * pos: where we're now writing, offset: where the request was
...@@ -179,7 +179,7 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset, ...@@ -179,7 +179,7 @@ int ecryptfs_write(struct inode *ecryptfs_inode, char *data, loff_t offset,
(data + data_offset), num_bytes); (data + data_offset), num_bytes);
data_offset += num_bytes; data_offset += num_bytes;
} }
kunmap_atomic(ecryptfs_page_virt, KM_USER0); kunmap_atomic(ecryptfs_page_virt);
flush_dcache_page(ecryptfs_page); flush_dcache_page(ecryptfs_page);
SetPageUptodate(ecryptfs_page); SetPageUptodate(ecryptfs_page);
unlock_page(ecryptfs_page); unlock_page(ecryptfs_page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment