Skip to content
Snippets Groups Projects
Commit 556f793a 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.

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 https://android-review.googlesource.com/q/commit:a87d130248adf95c218c461a15f08b983aac74be)
Merged-In: Ie2ce55bdac091bc4880478eeba2a76e1608726e3
Change-Id: Ie2ce55bdac091bc4880478eeba2a76e1608726e3
parent 7c627b9b
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment