summaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorMichael Halcrow <mhalcrow@us.ibm.com>2007-10-16 01:28:12 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:12 -0700
commit035241d30e273519195a9987e6eb56bbe2297872 (patch)
tree56865416d10597588c00957766d3e6189b19a014 /fs/ecryptfs
parentd6a13c17164fccab8aa96ca435ddacbf428335ca (diff)
downloadop-kernel-dev-035241d30e273519195a9987e6eb56bbe2297872.zip
op-kernel-dev-035241d30e273519195a9987e6eb56bbe2297872.tar.gz
eCryptfs: initialize persistent lower file on inode create
Initialize persistent lower file on inode create. Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/super.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/ecryptfs/super.c b/fs/ecryptfs/super.c
index b97e2106..f8cdab2b 100644
--- a/fs/ecryptfs/super.c
+++ b/fs/ecryptfs/super.c
@@ -47,15 +47,16 @@ struct kmem_cache *ecryptfs_inode_info_cache;
*/
static struct inode *ecryptfs_alloc_inode(struct super_block *sb)
{
- struct ecryptfs_inode_info *ecryptfs_inode;
+ struct ecryptfs_inode_info *inode_info;
struct inode *inode = NULL;
- ecryptfs_inode = kmem_cache_alloc(ecryptfs_inode_info_cache,
- GFP_KERNEL);
- if (unlikely(!ecryptfs_inode))
+ inode_info = kmem_cache_alloc(ecryptfs_inode_info_cache, GFP_KERNEL);
+ if (unlikely(!inode_info))
goto out;
- ecryptfs_init_crypt_stat(&ecryptfs_inode->crypt_stat);
- inode = &ecryptfs_inode->vfs_inode;
+ ecryptfs_init_crypt_stat(&inode_info->crypt_stat);
+ mutex_init(&inode_info->lower_file_mutex);
+ inode_info->lower_file = NULL;
+ inode = &inode_info->vfs_inode;
out:
return inode;
}
OpenPOWER on IntegriCloud