mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 21:33:00 +00:00
fuse: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
parent
27f1b36326
commit
f2b3455e47
@ -1992,8 +1992,8 @@ static int fuse_writepages(struct address_space *mapping,
|
||||
data.ff = NULL;
|
||||
|
||||
err = -ENOMEM;
|
||||
data.orig_pages = kzalloc(sizeof(struct page *) *
|
||||
FUSE_MAX_PAGES_PER_REQ,
|
||||
data.orig_pages = kcalloc(FUSE_MAX_PAGES_PER_REQ,
|
||||
sizeof(struct page *),
|
||||
GFP_NOFS);
|
||||
if (!data.orig_pages)
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user