Skip to content

Commit 91b1ad0

Browse files
lostjefflehsiangkao
authored andcommitted
erofs: release ztailpacking pclusters properly
Currently ztailpacking pclusters are chained with FOLLOWED_NOINPLACE and not recorded into the managed_pslots XArray. After commit 7674a42 ("erofs: use struct lockref to replace handcrafted approach"), ztailpacking pclusters won't be freed with erofs_workgroup_put() anymore, which will cause the following issue: BUG erofs_pcluster-1 (Tainted: G OE ): Objects remaining in erofs_pcluster-1 on __kmem_cache_shutdown() Use z_erofs_free_pcluster() directly to free ztailpacking pclusters. Fixes: 7674a42 ("erofs: use struct lockref to replace handcrafted approach") Signed-off-by: Jingbo Xu <[email protected]> Reviewed-by: Gao Xiang <[email protected]> Reviewed-by: Chao Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
1 parent 5ec693c commit 91b1ad0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/erofs/zdata.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,10 @@ static void z_erofs_decompress_queue(const struct z_erofs_decompressqueue *io,
13691369
owned = READ_ONCE(be.pcl->next);
13701370

13711371
z_erofs_decompress_pcluster(&be, io->eio ? -EIO : 0);
1372-
erofs_workgroup_put(&be.pcl->obj);
1372+
if (z_erofs_is_inline_pcluster(be.pcl))
1373+
z_erofs_free_pcluster(be.pcl);
1374+
else
1375+
erofs_workgroup_put(&be.pcl->obj);
13731376
}
13741377
}
13751378

0 commit comments

Comments
 (0)