diff options
Diffstat (limited to 'fs/file.c')
| -rw-r--r-- | fs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/file.c b/fs/file.c index 51ddcff0081a..384c83ce768d 100644 --- a/fs/file.c +++ b/fs/file.c @@ -212,11 +212,11 @@ static struct fdtable *alloc_fdtable(unsigned int slots_wanted) if (unlikely(nr > INT_MAX / sizeof(struct file *))) return ERR_PTR(-EMFILE); - fdt = kmalloc(sizeof(struct fdtable), GFP_KERNEL_ACCOUNT); + fdt = kmalloc_obj(struct fdtable, GFP_KERNEL_ACCOUNT); if (!fdt) goto out; fdt->max_fds = nr; - data = kvmalloc_array(nr, sizeof(struct file *), GFP_KERNEL_ACCOUNT); + data = kvmalloc_objs(struct file *, nr, GFP_KERNEL_ACCOUNT); if (!data) goto out_fdt; fdt->fd = data; |
