diff options
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r-- | fs/f2fs/checkpoint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c index 9624a8f7254b..9f1c96caebda 100644 --- a/fs/f2fs/checkpoint.c +++ b/fs/f2fs/checkpoint.c | |||
@@ -806,7 +806,8 @@ int f2fs_get_valid_checkpoint(struct f2fs_sb_info *sbi) | |||
806 | block_t cp_blk_no; | 806 | block_t cp_blk_no; |
807 | int i; | 807 | int i; |
808 | 808 | ||
809 | sbi->ckpt = f2fs_kzalloc(sbi, cp_blks * blk_size, GFP_KERNEL); | 809 | sbi->ckpt = f2fs_kzalloc(sbi, array_size(blk_size, cp_blks), |
810 | GFP_KERNEL); | ||
810 | if (!sbi->ckpt) | 811 | if (!sbi->ckpt) |
811 | return -ENOMEM; | 812 | return -ENOMEM; |
812 | /* | 813 | /* |