diff options
author | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2011-05-24 06:11:12 -0400 |
---|---|---|
committer | Tyler Hicks <tyhicks@linux.vnet.ibm.com> | 2011-05-29 15:24:25 -0400 |
commit | 3063287053bca5207e121c567b95b2b6f0bdc2c8 (patch) | |
tree | 404c92175f536d20576254a43a7a93b3b02343f2 /fs/ecryptfs/crypto.c | |
parent | 778aeb42a708d2a57e491d2cbb5a1e74f61270b9 (diff) |
eCryptfs: Remove ecryptfs_header_cache_2
Now that ecryptfs_lookup_interpose() is no longer using
ecryptfs_header_cache_2 to read in metadata, the kmem_cache can be
removed and the ecryptfs_header_cache_1 kmem_cache can be renamed to
ecryptfs_header_cache.
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Diffstat (limited to 'fs/ecryptfs/crypto.c')
-rw-r--r-- | fs/ecryptfs/crypto.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c index 66d8e6748a46..58609bde3b9f 100644 --- a/fs/ecryptfs/crypto.c +++ b/fs/ecryptfs/crypto.c | |||
@@ -1234,8 +1234,7 @@ ecryptfs_write_header_metadata(char *virt, | |||
1234 | (*written) = 6; | 1234 | (*written) = 6; |
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | struct kmem_cache *ecryptfs_header_cache_1; | 1237 | struct kmem_cache *ecryptfs_header_cache; |
1238 | struct kmem_cache *ecryptfs_header_cache_2; | ||
1239 | 1238 | ||
1240 | /** | 1239 | /** |
1241 | * ecryptfs_write_headers_virt | 1240 | * ecryptfs_write_headers_virt |
@@ -1601,7 +1600,7 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) | |||
1601 | ecryptfs_copy_mount_wide_flags_to_inode_flags(crypt_stat, | 1600 | ecryptfs_copy_mount_wide_flags_to_inode_flags(crypt_stat, |
1602 | mount_crypt_stat); | 1601 | mount_crypt_stat); |
1603 | /* Read the first page from the underlying file */ | 1602 | /* Read the first page from the underlying file */ |
1604 | page_virt = kmem_cache_alloc(ecryptfs_header_cache_1, GFP_USER); | 1603 | page_virt = kmem_cache_alloc(ecryptfs_header_cache, GFP_USER); |
1605 | if (!page_virt) { | 1604 | if (!page_virt) { |
1606 | rc = -ENOMEM; | 1605 | rc = -ENOMEM; |
1607 | printk(KERN_ERR "%s: Unable to allocate page_virt\n", | 1606 | printk(KERN_ERR "%s: Unable to allocate page_virt\n", |
@@ -1646,7 +1645,7 @@ int ecryptfs_read_metadata(struct dentry *ecryptfs_dentry) | |||
1646 | out: | 1645 | out: |
1647 | if (page_virt) { | 1646 | if (page_virt) { |
1648 | memset(page_virt, 0, PAGE_CACHE_SIZE); | 1647 | memset(page_virt, 0, PAGE_CACHE_SIZE); |
1649 | kmem_cache_free(ecryptfs_header_cache_1, page_virt); | 1648 | kmem_cache_free(ecryptfs_header_cache, page_virt); |
1650 | } | 1649 | } |
1651 | return rc; | 1650 | return rc; |
1652 | } | 1651 | } |