Skip to content

Commit

Permalink
f2fs: le32_to_cpu for ckpt->cp_pack_total_block_count
Browse files Browse the repository at this point in the history
Fixes: 22ad0b6 ("f2fs: add bitmaps for empty or full NAT blocks")
Signed-off-by: Kinglong Mee <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
  • Loading branch information
kinglongmee authored and Jaegeuk Kim committed Mar 21, 2017
1 parent b71dead commit 10047f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/f2fs/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,8 @@ static void update_ckpt_flags(struct f2fs_sb_info *sbi, struct cp_control *cpc)

spin_lock(&sbi->cp_lock);

if (cpc->reason == CP_UMOUNT && ckpt->cp_pack_total_block_count >
if (cpc->reason == CP_UMOUNT &&
le32_to_cpu(ckpt->cp_pack_total_block_count) >
sbi->blocks_per_seg - NM_I(sbi)->nat_bits_blocks)
disable_nat_bits(sbi, false);

Expand Down

0 comments on commit 10047f5

Please sign in to comment.