]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:56:39 +0000 (10:56 +0200)
commit376e35eca187e59d0a32c56edb1b7b51e077bce8
tree4b53cef4b66efe7922f1360cfc2a24954c4f6ab7
parent936158b15e2648253afb824d252c910c496d34b5
f2fs: compress: fix to assign cc.cluster_idx correctly

[ 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>
fs/f2fs/compress.c
fs/f2fs/data.c
fs/f2fs/f2fs.h