summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2017-03-11 21:18:01 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-21 16:52:16 -0400
commit10047f537c8fb33599bae599ed0e1d9551639d80 (patch)
tree4ca5195ac31d75cad9e22f764a031be989d83bac /fs
parentb71deadbc4d0271cd3b298e57ad8be70b0c391c3 (diff)
downloadlinux-10047f537c8fb33599bae599ed0e1d9551639d80.tar.gz
linux-10047f537c8fb33599bae599ed0e1d9551639d80.tar.bz2
linux-10047f537c8fb33599bae599ed0e1d9551639d80.zip
f2fs: le32_to_cpu for ckpt->cp_pack_total_block_count
Fixes: 22ad0b6ab4 ("f2fs: add bitmaps for empty or full NAT blocks") Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/checkpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 0339daf4ca02..b72a9aad296c 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -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);