dentry_info_cache entries allocated by ecryptfs_lookup_and_interpose_lower
aren't zalloced where dentry_info_cache entries allocated by ecryptfs
mount are.

Since this tripped me up while debugging, make sure dentry_info_cache_entries
entries are cleared when allocated.

Signed-off-by: John Johansen <[email protected]>
---
 fs/ecryptfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
index bd33f87..eba14c5 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -260,7 +260,7 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry 
*ecryptfs_dentry,
        fsstack_copy_attr_atime(ecryptfs_dir_inode, lower_dir_dentry->d_inode);
        BUG_ON(!lower_dentry->d_count);
        ecryptfs_set_dentry_private(ecryptfs_dentry,
-                                   kmem_cache_alloc(ecryptfs_dentry_info_cache,
+                                  kmem_cache_zalloc(ecryptfs_dentry_info_cache,
                                                     GFP_KERNEL));
        if (!ecryptfs_dentry_to_private(ecryptfs_dentry)) {
                rc = -ENOMEM;
-- 
1.7.1


_______________________________________________
Mailing list: https://launchpad.net/~ecryptfs-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ecryptfs-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to