]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
f2fs: compress: fix to assign cc.cluster_idx correctly
authorChao Yu <yuchao0@huawei.com>
Mon, 10 May 2021 09:30:32 +0000 (17:30 +0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 18 Jun 2021 09:07:31 +0000 (11:07 +0200)
commit6e524acbd8b66ad1b52e4a363016634e6a4ee422
treeb98ce37d067f96f773461a0d1f1be111bfcadc66
parentd5b49fed2523abcee2b7d6b30b086f8cff8262a8
f2fs: compress: fix to assign cc.cluster_idx correctly

BugLink: https://bugs.launchpad.net/bugs/1931292
[ Upstream commit 8bfbfb0ddd706b1ce2e89259ecc45f192c0ec2bf ]

In f2fs_destroy_compress_ctx(), after f2fs_destroy_compress_ctx(),
cc.cluster_idx will be cleared w/ NULL_CLUSTER, f2fs_cluster_blocks()
may check wrong cluster metadata, fix it.

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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/f2fs.h