diff options
Diffstat (limited to 'fs/ext4/dir.c')
| -rw-r--r-- | fs/ext4/dir.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 00c4b3c82b65..b285ce18b183 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -480,8 +480,7 @@ int ext4_htree_store_dirent(struct file *dir_file, __u32 hash, p = &info->root.rb_node; /* Create and allocate the fname structure */ - new_fn = kzalloc(struct_size(new_fn, name, ent_name->len + 1), - GFP_KERNEL); + new_fn = kzalloc_flex(*new_fn, name, ent_name->len + 1, GFP_KERNEL); if (!new_fn) return -ENOMEM; new_fn->hash = hash; @@ -673,7 +672,7 @@ static int ext4_dir_open(struct inode *inode, struct file *file) { struct dir_private_info *info; - info = kzalloc(sizeof(*info), GFP_KERNEL); + info = kzalloc_obj(*info, GFP_KERNEL); if (!info) return -ENOMEM; file->private_data = info; |
