]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
f2fs: fix to update last i_size if fallocate partially succeeds
authorChao Yu <yuchao0@huawei.com>
Wed, 24 Mar 2021 03:24:33 +0000 (11:24 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 09:07:10 +0000 (11:07 +0200)
commit0873a377e61d9884e4f70c0bd5b0a8b8575b1ec4
tree5c84d3ed1f4e6a06049c44a6a840b4a9e449a31f
parentf633c63241f0f5ea9c1fe10b23f1dc06585b0010
f2fs: fix to update last i_size if fallocate partially succeeds

BugLink: https://bugs.launchpad.net/bugs/1931292
[ Upstream commit 88f2cfc5fa90326edb569b4a81bb38ed4dcd3108 ]

In the case of expanding pinned file, map.m_lblk and map.m_len
will update in each round of section allocation, so in error
path, last i_size will be calculated with wrong m_lblk and m_len,
fix it.

Fixes: f5a53edcf01e ("f2fs: support aligned pinned file")
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/f2fs/file.c