f2fs: fix to check available space of CP area correctly in update_ckpt_flags()
authorChao Yu <chao@kernel.org>
Sun, 12 Dec 2021 12:28:12 +0000 (20:28 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:30 +0000 (11:05 +0100)
commit2d7d3b6da85e219abed247a63a4754f04376e2fa
tree25627da4577de26c00d38554af778931d6b82d17
parent0789b9b3492264e4bbe212b688866117d14df0c8
f2fs: fix to check available space of CP area correctly in update_ckpt_flags()

commit b702c83e2eaa2fa2d72e957c55c0321535cc8b9f upstream.

Otherwise, nat_bit area may be persisted across boundary of CP area during
nat_bit rebuilding.

Fixes: 94c821fb286b ("f2fs: rebuild nat_bits during umount")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/checkpoint.c