f2fs: compress: fix error path of inc_valid_block_count()
authorChao Yu <chao@kernel.org>
Mon, 6 May 2024 10:41:37 +0000 (18:41 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 10 May 2024 03:38:28 +0000 (03:38 +0000)
commit043c832371cd9023fbd725138ddc6c7f288dc469
treeb9a9c1cacdc1d076f41db2259a3e1a7c4f68563c
parenta3a0bc6c223908a2a06736bcd43db962e0657c67
f2fs: compress: fix error path of inc_valid_block_count()

If inc_valid_block_count() can not allocate all requested blocks,
it needs to release block count in .total_valid_block_count and
resevation blocks in inode.

Fixes: 54607494875e ("f2fs: compress: fix to avoid inconsistence bewteen i_blocks and dnode")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h