diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-03-11 14:18:01 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-03-21 21:52:16 +0100 |
commit | 10047f537c8fb33599bae599ed0e1d9551639d80 (patch) | |
tree | 4ca5195ac31d75cad9e22f764a031be989d83bac /fs/f2fs/checkpoint.c | |
parent | f2fs: le16_to_cpu for xattr->e_value_size (diff) | |
download | linux-10047f537c8fb33599bae599ed0e1d9551639d80.tar.xz 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 '')
-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 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); |