f2fs: fix to update age extent correctly during truncation
authorChao Yu <chao@kernel.org>
Tue, 31 Jan 2023 14:47:00 +0000 (22:47 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 2 Feb 2023 21:37:17 +0000 (13:37 -0800)
commit8c0ed062ce27f6b7f0a568cb241e2b4dd2d9e6a6
treef09c800cf5c13fefb26fad485d3fb4079ab14bfd
parent0dbbf0fb38d5ec5d4138d1aeaeb43d9217b9a592
f2fs: fix to update age extent correctly during truncation

nr_free may be less than len, we should update age extent cache
w/ range [fofs, len] rather than [fofs, nr_free].

Fixes: 71644dff4811 ("f2fs: add block_age-based extent cache")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/file.c