f2fs: compress: fix to update isize when overwriting compressed file
authorChao Yu <yuchao0@huawei.com>
Fri, 24 Jul 2020 10:21:36 +0000 (18:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:07:37 +0000 (13:07 +0200)
commitbfd05afee1d4de3d71d98d69937c4e63509aeb93
tree063b12f0ec2f0888e6c4171577a2ef3bf4f6a024
parent5a8e852af62c693fc2072c45db58d58cf9c81da0
f2fs: compress: fix to update isize when overwriting compressed file

[ Upstream commit 944dd22ea4475bd11180fd2f431a4a547ca4d8f5 ]

We missed to update isize of compressed file in write_end() with
below case:

cluster size is 16KB

- write 14KB data from offset 0
- overwrite 16KB data from offset 0

Fixes: 4c8ff7095bef ("f2fs: support data compression")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/data.c