diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index e7441e8d1ff88f04213c94683b89618424be335f..eac952271e45a3fa5112359ec40fad2088eb4e7e 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2783,9 +2783,11 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
 		int n = (i == META) ? 1: NR_TEMP_TYPE;
 		int j;
 
-		sbi->write_io[i] = f2fs_kmalloc(sbi,
-					n * sizeof(struct f2fs_bio_info),
-					GFP_KERNEL);
+		sbi->write_io[i] =
+			f2fs_kmalloc(sbi,
+				     array_size(n,
+						sizeof(struct f2fs_bio_info)),
+				     GFP_KERNEL);
 		if (!sbi->write_io[i]) {
 			err = -ENOMEM;
 			goto free_options;