aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-23 18:39:15 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2014-07-09 14:04:25 -0700
commitb434babf854eab82397759e98425423cd9bc4786 (patch)
tree0517852f329dc0aaa6b863cdf0387fc25f0a41b1 /fs/f2fs
parentf2fs: refactor flush_nat_entries codes for reducing NAT writes (diff)
downloadlinux-dev-b434babf854eab82397759e98425423cd9bc4786.tar.xz
linux-dev-b434babf854eab82397759e98425423cd9bc4786.zip
f2fs: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Cc: Jaegeuk Kim <jaegeuk.kim@samsung.com> Cc: linux-f2fs-devel@lists.sourceforge.net Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index d04613df710a..a4f8375f6ae6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1703,7 +1703,7 @@ static int build_curseg(struct f2fs_sb_info *sbi)
struct curseg_info *array;
int i;
- array = kzalloc(sizeof(*array) * NR_CURSEG_TYPE, GFP_KERNEL);
+ array = kcalloc(NR_CURSEG_TYPE, sizeof(*array), GFP_KERNEL);
if (!array)
return -ENOMEM;