f2fs: check free sections before disable checkpoint
authorWu Bo <bo.wu@vivo.com>
Fri, 29 Dec 2023 03:25:07 +0000 (20:25 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 6 Feb 2024 02:58:38 +0000 (18:58 -0800)
commit0d8c7542f93a06e68c05a1a8ad47c52ea7cc3e95
tree68d8d77f7df15a0b458f59bcb03a9c7fe3d17f8f
parentc10e8558d49d4ec62d78af1cf2852a1640bea9f7
f2fs: check free sections before disable checkpoint

'f2fs_is_checkpoint_ready()' checks free sections. If there is not
enough free sections, most f2fs operations will return -ENOSPC when
checkpoint is disabled.

It would be better to check free sections before disable checkpoint.

Signed-off-by: Wu Bo <bo.wu@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c