f2fs: refactor the hole reporting and allocation logic in f2fs_map_blocks
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Nov 2022 09:15:23 +0000 (10:15 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 6 Jan 2023 23:13:38 +0000 (15:13 -0800)
commitfdbf69a7f5be2896af3a9a6213fb0ab8e194b190
tree0d3815557ba79444f0be4cc3c12f18e929d30d63
parent817c968b79d02588370e3d1dc5e5961cfd57d2b1
f2fs: refactor the hole reporting and allocation logic in f2fs_map_blocks

Add a is_hole local variable to figure out if the block number might need
allocation, and untangle to logic to report the hole or fill it with a
block allocation.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c