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 | |
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')
-rw-r--r-- | fs/ecryptfs/crypto.c | 7 | ||||
-rw-r--r-- | fs/ecryptfs/ecryptfs_kernel.h | 3 | ||||
-rw-r--r-- | fs/ecryptfs/main.c | 9 |
3 files changed, 6 insertions, 13 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 | } |
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h index 8297ddaca7c4..43c7c43b06f5 100644 --- a/fs/ecryptfs/ecryptfs_kernel.h +++ b/fs/ecryptfs/ecryptfs_kernel.h | |||
@@ -605,8 +605,7 @@ extern struct kmem_cache *ecryptfs_file_info_cache; | |||
605 | extern struct kmem_cache *ecryptfs_dentry_info_cache; | 605 | extern struct kmem_cache *ecryptfs_dentry_info_cache; |
606 | extern struct kmem_cache *ecryptfs_inode_info_cache; | 606 | extern struct kmem_cache *ecryptfs_inode_info_cache; |
607 | extern struct kmem_cache *ecryptfs_sb_info_cache; | 607 | extern struct kmem_cache *ecryptfs_sb_info_cache; |
608 | extern struct kmem_cache *ecryptfs_header_cache_1; | 608 | extern struct kmem_cache *ecryptfs_header_cache; |
609 | extern struct kmem_cache *ecryptfs_header_cache_2; | ||
610 | extern struct kmem_cache *ecryptfs_xattr_cache; | 609 | extern struct kmem_cache *ecryptfs_xattr_cache; |
611 | extern struct kmem_cache *ecryptfs_key_record_cache; | 610 | extern struct kmem_cache *ecryptfs_key_record_cache; |
612 | extern struct kmem_cache *ecryptfs_key_sig_cache; | 611 | extern struct kmem_cache *ecryptfs_key_sig_cache; |
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 943a4f55ed6d..9f1bb747d77d 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -635,13 +635,8 @@ static struct ecryptfs_cache_info { | |||
635 | .size = sizeof(struct ecryptfs_sb_info), | 635 | .size = sizeof(struct ecryptfs_sb_info), |
636 | }, | 636 | }, |
637 | { | 637 | { |
638 | .cache = &ecryptfs_header_cache_1, | 638 | .cache = &ecryptfs_header_cache, |
639 | .name = "ecryptfs_headers_1", | 639 | .name = "ecryptfs_headers", |
640 | .size = PAGE_CACHE_SIZE, | ||
641 | }, | ||
642 | { | ||
643 | .cache = &ecryptfs_header_cache_2, | ||
644 | .name = "ecryptfs_headers_2", | ||
645 | .size = PAGE_CACHE_SIZE, | 640 | .size = PAGE_CACHE_SIZE, |
646 | }, | 641 | }, |
647 | { | 642 | { |