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:
Fabian Frederick 2014-06-23 18:35:15 +02:00 committed by Miklos Szeredi
parent 27f1b36326
commit f2b3455e47

View File

@ -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;