f2fs: introduce get_available_block_count() for cleanup
authorChao Yu <chao@kernel.org>
Tue, 20 Feb 2024 03:15:15 +0000 (11:15 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 27 Feb 2024 17:41:16 +0000 (09:41 -0800)
commit0f1c6ede6da9f7c5dd7380b74a64850298279168
treef37176e28c1eab4aaea9181d4321e502976fc649
parent9703d69d9d153bb230711d0d577454552aeb13d4
f2fs: introduce get_available_block_count() for cleanup

There are very similar codes in inc_valid_block_count() and
inc_valid_node_count() which is used for available user block
count calculation.

This patch introduces a new helper get_available_block_count()
to include those common codes, and used it to clean up codes.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h