aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/shmem.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index b4b56fd1e772..b206a7a32e2a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -2309,17 +2309,14 @@ int shmem_fill_super(struct super_block *sb, void *data, int silent)
2309 int err = -ENOMEM; 2309 int err = -ENOMEM;
2310 2310
2311 /* Round up to L1_CACHE_BYTES to resist false sharing */ 2311 /* Round up to L1_CACHE_BYTES to resist false sharing */
2312 sbinfo = kmalloc(max((int)sizeof(struct shmem_sb_info), 2312 sbinfo = kzalloc(max((int)sizeof(struct shmem_sb_info),
2313 L1_CACHE_BYTES), GFP_KERNEL); 2313 L1_CACHE_BYTES), GFP_KERNEL);
2314 if (!sbinfo) 2314 if (!sbinfo)
2315 return -ENOMEM; 2315 return -ENOMEM;
2316 2316
2317 sbinfo->max_blocks = 0;
2318 sbinfo->max_inodes = 0;
2319 sbinfo->mode = S_IRWXUGO | S_ISVTX; 2317 sbinfo->mode = S_IRWXUGO | S_ISVTX;
2320 sbinfo->uid = current_fsuid(); 2318 sbinfo->uid = current_fsuid();
2321 sbinfo->gid = current_fsgid(); 2319 sbinfo->gid = current_fsgid();
2322 sbinfo->mpol = NULL;
2323 sb->s_fs_info = sbinfo; 2320 sb->s_fs_info = sbinfo;
2324 2321
2325#ifdef CONFIG_TMPFS 2322#ifdef CONFIG_TMPFS