diff options
-rw-r--r-- | fs/ecryptfs/super.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c index b97e2106f670..f8cdab2bee3d 100644 --- a/fs/ecryptfs/super.c +++ b/fs/ecryptfs/super.c | |||
@@ -47,15 +47,16 @@ struct kmem_cache *ecryptfs_inode_info_cache; | |||
47 | */ | 47 | */ |
48 | static struct inode *ecryptfs_alloc_inode(struct super_block *sb) | 48 | static struct inode *ecryptfs_alloc_inode(struct super_block *sb) |
49 | { | 49 | { |
50 | struct ecryptfs_inode_info *ecryptfs_inode; | 50 | struct ecryptfs_inode_info *inode_info; |
51 | struct inode *inode = NULL; | 51 | struct inode *inode = NULL; |
52 | 52 | ||
53 | ecryptfs_inode = kmem_cache_alloc(ecryptfs_inode_info_cache, | 53 | inode_info = kmem_cache_alloc(ecryptfs_inode_info_cache, GFP_KERNEL); |
54 | GFP_KERNEL); | 54 | if (unlikely(!inode_info)) |
55 | if (unlikely(!ecryptfs_inode)) | ||
56 | goto out; | 55 | goto out; |
57 | ecryptfs_init_crypt_stat(&ecryptfs_inode->crypt_stat); | 56 | ecryptfs_init_crypt_stat(&inode_info->crypt_stat); |
58 | inode = &ecryptfs_inode->vfs_inode; | 57 | mutex_init(&inode_info->lower_file_mutex); |
58 | inode_info->lower_file = NULL; | ||
59 | inode = &inode_info->vfs_inode; | ||
59 | out: | 60 | out: |
60 | return inode; | 61 | return inode; |
61 | } | 62 | } |