Skip to content

Commit

Permalink
fuse: replace count*size kzalloc by kcalloc
Browse files Browse the repository at this point in the history
kcalloc manages count*sizeof overflow.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
  • Loading branch information
Fabian Frederick authored and Miklos Szeredi committed Jul 14, 2014
1 parent 27f1b36 commit f2b3455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f2b3455

Please sign in to comment.