aboutsummaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/super.c b/fs/super.c
index 37554b876182..8743e9bbb297 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -55,11 +55,10 @@ DEFINE_SPINLOCK(sb_lock);
55 */ 55 */
56static struct super_block *alloc_super(void) 56static struct super_block *alloc_super(void)
57{ 57{
58 struct super_block *s = kmalloc(sizeof(struct super_block), GFP_USER); 58 struct super_block *s = kzalloc(sizeof(struct super_block), GFP_USER);
59 static struct super_operations default_op; 59 static struct super_operations default_op;
60 60
61 if (s) { 61 if (s) {
62 memset(s, 0, sizeof(struct super_block));
63 if (security_sb_alloc(s)) { 62 if (security_sb_alloc(s)) {
64 kfree(s); 63 kfree(s);
65 s = NULL; 64 s = NULL;