aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 16:35:17 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-07 16:35:17 -0500
commit21b4e736922f546e0f1aa7b9d6c442f309a2444a (patch)
treee1be8645297f8ebe87445251743ebcc52081a20d /fs/ecryptfs
parent34161db6b14d984fb9b06c735b7b42f8803f6851 (diff)
parent68380b581383c028830f79ec2670f4a193854aa6 (diff)
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/ into merge_linus
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/crypto.c6
-rw-r--r--fs/ecryptfs/file.c2
-rw-r--r--fs/ecryptfs/inode.c6
-rw-r--r--fs/ecryptfs/keystore.c2
-rw-r--r--fs/ecryptfs/main.c8
-rw-r--r--fs/ecryptfs/super.c2
6 files changed, 13 insertions, 13 deletions
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index f63a7755fe86..7196f50fe152 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -628,7 +628,7 @@ int ecryptfs_decrypt_page(struct file *file, struct page *page)
628 num_extents_per_page = PAGE_CACHE_SIZE / crypt_stat->extent_size; 628 num_extents_per_page = PAGE_CACHE_SIZE / crypt_stat->extent_size;
629 base_extent = (page->index * num_extents_per_page); 629 base_extent = (page->index * num_extents_per_page);
630 lower_page_virt = kmem_cache_alloc(ecryptfs_lower_page_cache, 630 lower_page_virt = kmem_cache_alloc(ecryptfs_lower_page_cache,
631 SLAB_KERNEL); 631 GFP_KERNEL);
632 if (!lower_page_virt) { 632 if (!lower_page_virt) {
633 rc = -ENOMEM; 633 rc = -ENOMEM;
634 ecryptfs_printk(KERN_ERR, "Error getting page for encrypted " 634 ecryptfs_printk(KERN_ERR, "Error getting page for encrypted "
@@ -1334,7 +1334,7 @@ int ecryptfs_write_headers(struct dentry *ecryptfs_dentry,
1334 goto out; 1334 goto out;
1335 } 1335 }
1336 /* Released in this function */ 1336 /* Released in this function */
1337 page_virt = kmem_cache_alloc(ecryptfs_header_cache_0, SLAB_USER); 1337 page_virt = kmem_cache_alloc(ecryptfs_header_cache_0, GFP_USER);
1338 if (!page_virt) { 1338 if (!page_virt) {
1339 ecryptfs_printk(KERN_ERR, "Out of memory\n"); 1339 ecryptfs_printk(KERN_ERR, "Out of memory\n");
1340 rc = -ENOMEM; 1340 rc = -ENOMEM;
@@ -1493,7 +1493,7 @@ int ecryptfs_read_headers(struct dentry *ecryptfs_dentry,
1493 &ecryptfs_inode_to_private(ecryptfs_dentry->d_inode)->crypt_stat; 1493 &ecryptfs_inode_to_private(ecryptfs_dentry->d_inode)->crypt_stat;
1494 1494
1495 /* Read the first page from the underlying file */ 1495 /* Read the first page from the underlying file */
1496 page_virt = kmem_cache_alloc(ecryptfs_header_cache_1, SLAB_USER); 1496 page_virt = kmem_cache_alloc(ecryptfs_header_cache_1, GFP_USER);
1497 if (!page_virt) { 1497 if (!page_virt) {
1498 rc = -ENOMEM; 1498 rc = -ENOMEM;
1499 ecryptfs_printk(KERN_ERR, "Unable to allocate page_virt\n"); 1499 ecryptfs_printk(KERN_ERR, "Unable to allocate page_virt\n");
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c
index a92ef05eff8f..42099e779a56 100644
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -250,7 +250,7 @@ static int ecryptfs_open(struct inode *inode, struct file *file)
250 int lower_flags; 250 int lower_flags;
251 251
252 /* Released in ecryptfs_release or end of function if failure */ 252 /* Released in ecryptfs_release or end of function if failure */
253 file_info = kmem_cache_alloc(ecryptfs_file_info_cache, SLAB_KERNEL); 253 file_info = kmem_cache_alloc(ecryptfs_file_info_cache, GFP_KERNEL);
254 ecryptfs_set_file_private(file, file_info); 254 ecryptfs_set_file_private(file, file_info);
255 if (!file_info) { 255 if (!file_info) {
256 ecryptfs_printk(KERN_ERR, 256 ecryptfs_printk(KERN_ERR,
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index dfcc68484f47..8a1945a84c36 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -369,7 +369,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
369 BUG_ON(!atomic_read(&lower_dentry->d_count)); 369 BUG_ON(!atomic_read(&lower_dentry->d_count));
370 ecryptfs_set_dentry_private(dentry, 370 ecryptfs_set_dentry_private(dentry,
371 kmem_cache_alloc(ecryptfs_dentry_info_cache, 371 kmem_cache_alloc(ecryptfs_dentry_info_cache,
372 SLAB_KERNEL)); 372 GFP_KERNEL));
373 if (!ecryptfs_dentry_to_private(dentry)) { 373 if (!ecryptfs_dentry_to_private(dentry)) {
374 rc = -ENOMEM; 374 rc = -ENOMEM;
375 ecryptfs_printk(KERN_ERR, "Out of memory whilst attempting " 375 ecryptfs_printk(KERN_ERR, "Out of memory whilst attempting "
@@ -404,7 +404,7 @@ static struct dentry *ecryptfs_lookup(struct inode *dir, struct dentry *dentry,
404 /* Released in this function */ 404 /* Released in this function */
405 page_virt = 405 page_virt =
406 (char *)kmem_cache_alloc(ecryptfs_header_cache_2, 406 (char *)kmem_cache_alloc(ecryptfs_header_cache_2,
407 SLAB_USER); 407 GFP_USER);
408 if (!page_virt) { 408 if (!page_virt) {
409 rc = -ENOMEM; 409 rc = -ENOMEM;
410 ecryptfs_printk(KERN_ERR, 410 ecryptfs_printk(KERN_ERR,
@@ -795,7 +795,7 @@ int ecryptfs_truncate(struct dentry *dentry, loff_t new_length)
795 /* Released at out_free: label */ 795 /* Released at out_free: label */
796 ecryptfs_set_file_private(&fake_ecryptfs_file, 796 ecryptfs_set_file_private(&fake_ecryptfs_file,
797 kmem_cache_alloc(ecryptfs_file_info_cache, 797 kmem_cache_alloc(ecryptfs_file_info_cache,
798 SLAB_KERNEL)); 798 GFP_KERNEL));
799 if (unlikely(!ecryptfs_file_to_private(&fake_ecryptfs_file))) { 799 if (unlikely(!ecryptfs_file_to_private(&fake_ecryptfs_file))) {
800 rc = -ENOMEM; 800 rc = -ENOMEM;
801 goto out; 801 goto out;
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index c3746f56d162..745c0f1bfbbd 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -207,7 +207,7 @@ parse_tag_3_packet(struct ecryptfs_crypt_stat *crypt_stat,
207 /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or 207 /* Released: wipe_auth_tok_list called in ecryptfs_parse_packet_set or
208 * at end of function upon failure */ 208 * at end of function upon failure */
209 auth_tok_list_item = 209 auth_tok_list_item =
210 kmem_cache_alloc(ecryptfs_auth_tok_list_item_cache, SLAB_KERNEL); 210 kmem_cache_alloc(ecryptfs_auth_tok_list_item_cache, GFP_KERNEL);
211 if (!auth_tok_list_item) { 211 if (!auth_tok_list_item) {
212 ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n"); 212 ecryptfs_printk(KERN_ERR, "Unable to allocate memory\n");
213 rc = -ENOMEM; 213 rc = -ENOMEM;
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
index a78d87d14baf..3ede12b25933 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
@@ -378,7 +378,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
378 /* Released in ecryptfs_put_super() */ 378 /* Released in ecryptfs_put_super() */
379 ecryptfs_set_superblock_private(sb, 379 ecryptfs_set_superblock_private(sb,
380 kmem_cache_alloc(ecryptfs_sb_info_cache, 380 kmem_cache_alloc(ecryptfs_sb_info_cache,
381 SLAB_KERNEL)); 381 GFP_KERNEL));
382 if (!ecryptfs_superblock_to_private(sb)) { 382 if (!ecryptfs_superblock_to_private(sb)) {
383 ecryptfs_printk(KERN_WARNING, "Out of memory\n"); 383 ecryptfs_printk(KERN_WARNING, "Out of memory\n");
384 rc = -ENOMEM; 384 rc = -ENOMEM;
@@ -402,7 +402,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent)
402 /* through deactivate_super(sb) from get_sb_nodev() */ 402 /* through deactivate_super(sb) from get_sb_nodev() */
403 ecryptfs_set_dentry_private(sb->s_root, 403 ecryptfs_set_dentry_private(sb->s_root,
404 kmem_cache_alloc(ecryptfs_dentry_info_cache, 404 kmem_cache_alloc(ecryptfs_dentry_info_cache,
405 SLAB_KERNEL)); 405 GFP_KERNEL));
406 if (!ecryptfs_dentry_to_private(sb->s_root)) { 406 if (!ecryptfs_dentry_to_private(sb->s_root)) {
407 ecryptfs_printk(KERN_ERR, 407 ecryptfs_printk(KERN_ERR,
408 "dentry_info_cache alloc failed\n"); 408 "dentry_info_cache alloc failed\n");
@@ -546,7 +546,7 @@ inode_info_init_once(void *vptr, struct kmem_cache *cachep, unsigned long flags)
546} 546}
547 547
548static struct ecryptfs_cache_info { 548static struct ecryptfs_cache_info {
549 kmem_cache_t **cache; 549 struct kmem_cache **cache;
550 const char *name; 550 const char *name;
551 size_t size; 551 size_t size;
552 void (*ctor)(void*, struct kmem_cache *, unsigned long); 552 void (*ctor)(void*, struct kmem_cache *, unsigned long);
@@ -691,7 +691,7 @@ static ssize_t version_show(struct ecryptfs_obj *obj, char *buff)
691 691
692static struct ecryptfs_attribute sysfs_attr_version = __ATTR_RO(version); 692static struct ecryptfs_attribute sysfs_attr_version = __ATTR_RO(version);
693 693
694struct ecryptfs_version_str_map_elem { 694static struct ecryptfs_version_str_map_elem {
695 u32 flag; 695 u32 flag;
696 char *str; 696 char *str;
697} ecryptfs_version_str_map[] = { 697} ecryptfs_version_str_map[] = {
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index 825757ae4867..eaa5daaf106e 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -50,7 +50,7 @@ static struct inode *ecryptfs_alloc_inode(struct super_block *sb)
50 struct inode *inode = NULL; 50 struct inode *inode = NULL;
51 51
52 ecryptfs_inode = kmem_cache_alloc(ecryptfs_inode_info_cache, 52 ecryptfs_inode = kmem_cache_alloc(ecryptfs_inode_info_cache,
53 SLAB_KERNEL); 53 GFP_KERNEL);
54 if (unlikely(!ecryptfs_inode)) 54 if (unlikely(!ecryptfs_inode))
55 goto out; 55 goto out;
56 ecryptfs_init_crypt_stat(&ecryptfs_inode->crypt_stat); 56 ecryptfs_init_crypt_stat(&ecryptfs_inode->crypt_stat);