aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 5ef336c1103c..fd999cab7b57 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -53,9 +53,8 @@ static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry)
53 53
54struct vfsmount *alloc_vfsmnt(const char *name) 54struct vfsmount *alloc_vfsmnt(const char *name)
55{ 55{
56 struct vfsmount *mnt = kmem_cache_alloc(mnt_cache, GFP_KERNEL); 56 struct vfsmount *mnt = kmem_cache_zalloc(mnt_cache, GFP_KERNEL);
57 if (mnt) { 57 if (mnt) {
58 memset(mnt, 0, sizeof(struct vfsmount));
59 atomic_set(&mnt->mnt_count, 1); 58 atomic_set(&mnt->mnt_count, 1);
60 INIT_LIST_HEAD(&mnt->mnt_hash); 59 INIT_LIST_HEAD(&mnt->mnt_hash);
61 INIT_LIST_HEAD(&mnt->mnt_child); 60 INIT_LIST_HEAD(&mnt->mnt_child);