From 79b5793be44d97c0a0e905c221858af08e5ebd85 Mon Sep 17 00:00:00 2001 From: Alexandru Gheorghiu Date: Thu, 28 Mar 2013 02:24:53 +0200 Subject: f2fs: use kmemdup Use kmemdup instead of kzalloc and memcpy. Signed-off-by: Alexandru Gheorghiu Acked-by: Namjae Jeon Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/f2fs/segment.c') diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 777f17e496e..17581495baf 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1403,10 +1403,9 @@ static int build_sit_info(struct f2fs_sb_info *sbi) bitmap_size = __bitmap_size(sbi, SIT_BITMAP); src_bitmap = __bitmap_ptr(sbi, SIT_BITMAP); - dst_bitmap = kzalloc(bitmap_size, GFP_KERNEL); + dst_bitmap = kmemdup(src_bitmap, bitmap_size, GFP_KERNEL); if (!dst_bitmap) return -ENOMEM; - memcpy(dst_bitmap, src_bitmap, bitmap_size); /* init SIT information */ sit_i->s_ops = &default_salloc_ops; -- cgit v1.2.3-18-g5258