aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-23 12:35:15 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2014-07-14 10:30:25 -0400
commitf2b3455e47c72bef80fe584adb9bb9bc5afdd99c (patch)
tree5ed3bd4fd4c423a7f3d52a3dc6d71d59016418a6 /fs/fuse
parent27f1b36326bc8b6911e7052bc4b80a10234f0ec5 (diff)
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>
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/file.c4
1 files changed, 2 insertions, 2 deletions
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,
1992 data.ff = NULL; 1992 data.ff = NULL;
1993 1993
1994 err = -ENOMEM; 1994 err = -ENOMEM;
1995 data.orig_pages = kzalloc(sizeof(struct page *) * 1995 data.orig_pages = kcalloc(FUSE_MAX_PAGES_PER_REQ,
1996 FUSE_MAX_PAGES_PER_REQ, 1996 sizeof(struct page *),
1997 GFP_NOFS); 1997 GFP_NOFS);
1998 if (!data.orig_pages) 1998 if (!data.orig_pages)
1999 goto out; 1999 goto out;