Commit f2b3455e authored by Fabian Frederick's avatar Fabian Frederick Committed by Miklos Szeredi

fuse: replace count*size kzalloc by kcalloc

kcalloc manages count*sizeof overflow.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 27f1b363
...@@ -1992,8 +1992,8 @@ static int fuse_writepages(struct address_space *mapping, ...@@ -1992,8 +1992,8 @@ static int fuse_writepages(struct address_space *mapping,
data.ff = NULL; data.ff = NULL;
err = -ENOMEM; err = -ENOMEM;
data.orig_pages = kzalloc(sizeof(struct page *) * data.orig_pages = kcalloc(FUSE_MAX_PAGES_PER_REQ,
FUSE_MAX_PAGES_PER_REQ, sizeof(struct page *),
GFP_NOFS); GFP_NOFS);
if (!data.orig_pages) if (!data.orig_pages)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment