Commit f8effc48 authored by Chao Yu's avatar Chao Yu Committed by Treehugger Robot
Browse files

BACKPORT: 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.

Bug: 399286969

Change-Id: Ie2ce55bdac091bc4880478eeba2a76e1608726e3
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 0f1c6ede)
[Added line for F2FS_IO_ALIGNED, which was removed in later kernels]
Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
(cherry picked from commit 38149d53)
parent 54182a07
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment