diff options
Diffstat (limited to 'fs/ecryptfs/main.c')
-rw-r--r-- | fs/ecryptfs/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index a78d87d14baf..d0541ae8faba 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/pagemap.h> | 35 | #include <linux/pagemap.h> |
36 | #include <linux/key.h> | 36 | #include <linux/key.h> |
37 | #include <linux/parser.h> | 37 | #include <linux/parser.h> |
38 | #include <linux/fs_stack.h> | ||
38 | #include "ecryptfs_kernel.h" | 39 | #include "ecryptfs_kernel.h" |
39 | 40 | ||
40 | /** | 41 | /** |
@@ -112,10 +113,10 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry, | |||
112 | d_add(dentry, inode); | 113 | d_add(dentry, inode); |
113 | else | 114 | else |
114 | d_instantiate(dentry, inode); | 115 | d_instantiate(dentry, inode); |
115 | ecryptfs_copy_attr_all(inode, lower_inode); | 116 | fsstack_copy_attr_all(inode, lower_inode, NULL); |
116 | /* This size will be overwritten for real files w/ headers and | 117 | /* This size will be overwritten for real files w/ headers and |
117 | * other metadata */ | 118 | * other metadata */ |
118 | ecryptfs_copy_inode_size(inode, lower_inode); | 119 | fsstack_copy_inode_size(inode, lower_inode); |
119 | out: | 120 | out: |
120 | return rc; | 121 | return rc; |
121 | } | 122 | } |
@@ -378,7 +379,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
378 | /* Released in ecryptfs_put_super() */ | 379 | /* Released in ecryptfs_put_super() */ |
379 | ecryptfs_set_superblock_private(sb, | 380 | ecryptfs_set_superblock_private(sb, |
380 | kmem_cache_alloc(ecryptfs_sb_info_cache, | 381 | kmem_cache_alloc(ecryptfs_sb_info_cache, |
381 | SLAB_KERNEL)); | 382 | GFP_KERNEL)); |
382 | if (!ecryptfs_superblock_to_private(sb)) { | 383 | if (!ecryptfs_superblock_to_private(sb)) { |
383 | ecryptfs_printk(KERN_WARNING, "Out of memory\n"); | 384 | ecryptfs_printk(KERN_WARNING, "Out of memory\n"); |
384 | rc = -ENOMEM; | 385 | rc = -ENOMEM; |
@@ -402,7 +403,7 @@ ecryptfs_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
402 | /* through deactivate_super(sb) from get_sb_nodev() */ | 403 | /* through deactivate_super(sb) from get_sb_nodev() */ |
403 | ecryptfs_set_dentry_private(sb->s_root, | 404 | ecryptfs_set_dentry_private(sb->s_root, |
404 | kmem_cache_alloc(ecryptfs_dentry_info_cache, | 405 | kmem_cache_alloc(ecryptfs_dentry_info_cache, |
405 | SLAB_KERNEL)); | 406 | GFP_KERNEL)); |
406 | if (!ecryptfs_dentry_to_private(sb->s_root)) { | 407 | if (!ecryptfs_dentry_to_private(sb->s_root)) { |
407 | ecryptfs_printk(KERN_ERR, | 408 | ecryptfs_printk(KERN_ERR, |
408 | "dentry_info_cache alloc failed\n"); | 409 | "dentry_info_cache alloc failed\n"); |
@@ -546,7 +547,7 @@ inode_info_init_once(void *vptr, struct kmem_cache *cachep, unsigned long flags) | |||
546 | } | 547 | } |
547 | 548 | ||
548 | static struct ecryptfs_cache_info { | 549 | static struct ecryptfs_cache_info { |
549 | kmem_cache_t **cache; | 550 | struct kmem_cache **cache; |
550 | const char *name; | 551 | const char *name; |
551 | size_t size; | 552 | size_t size; |
552 | void (*ctor)(void*, struct kmem_cache *, unsigned long); | 553 | void (*ctor)(void*, struct kmem_cache *, unsigned long); |
@@ -691,7 +692,7 @@ static ssize_t version_show(struct ecryptfs_obj *obj, char *buff) | |||
691 | 692 | ||
692 | static struct ecryptfs_attribute sysfs_attr_version = __ATTR_RO(version); | 693 | static struct ecryptfs_attribute sysfs_attr_version = __ATTR_RO(version); |
693 | 694 | ||
694 | struct ecryptfs_version_str_map_elem { | 695 | static struct ecryptfs_version_str_map_elem { |
695 | u32 flag; | 696 | u32 flag; |
696 | char *str; | 697 | char *str; |
697 | } ecryptfs_version_str_map[] = { | 698 | } ecryptfs_version_str_map[] = { |