erofs: fix memory leak of LZMA global compressed deduplication
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 7 Sep 2023 05:05:42 +0000 (13:05 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 11 Sep 2023 00:03:32 +0000 (08:03 +0800)
commit75a5221630fe5aa3fedba7a06be618db0f79ba1e
treeab7720ebe12e5c3edbd148c5f7368fe738ae7b96
parent0bb80ecc33a8fb5a682236443c1e740d5c917d1d
erofs: fix memory leak of LZMA global compressed deduplication

When stressing microLZMA EROFS images with the new global compressed
deduplication feature enabled (`-Ededupe`), I found some short-lived
temporary pages weren't properly released, which could slowly cause
unexpected OOMs hours later.

Let's fix it now (LZ4 and DEFLATE don't have this issue.)

Fixes: 5c2a64252c5d ("erofs: introduce partial-referenced pclusters")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230907050542.97152-1-hsiangkao@linux.alibaba.com
fs/erofs/decompressor_lzma.c