From: Fabian Frederick Date: Mon, 23 Jun 2014 16:35:15 +0000 (+0200) Subject: fuse: replace count*size kzalloc by kcalloc X-Git-Tag: v3.16-rc6~35^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f2b3455e47c72bef80fe584adb9bb9bc5afdd99c;p=linux.git fuse: replace count*size kzalloc by kcalloc kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 35b6f31ecc38..1570dad1915d 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -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;