]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: should not truncate blocks during roll-forward recovery
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 21 Apr 2022 23:47:02 +0000 (16:47 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 22 Apr 2022 01:57:09 +0000 (18:57 -0700)
commit3c889505bb05ae4ebc68a5c51b0228d4b52f3244
tree62abe1a03469bbd3df3e740248356444b4401142
parentb210069f19eb54411f93d6aa5e9be5635bc7cb21
f2fs: should not truncate blocks during roll-forward recovery

If the file preallocated blocks and fsync'ed, we should not truncate them during
roll-forward recovery which will recover i_size correctly back.

Fixes: 20648091a1b2 ("f2fs: do not expose unwritten blocks to user by DIO")
Cc: <stable@vger.kernel.org> # 5.17+
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/inode.c