summaryrefslogtreecommitdiff
path: root/certs
diff options
context:
space:
mode:
authorBarry Song <v-songbaohua@oppo.com>2024-02-20 00:19:35 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-02-24 04:48:31 +0300
commit55e78c933d747ed44b2b22879e6a55e5af34b9f7 (patch)
tree785436d62939bded2689efaf961e38aa65c16180 /certs
parent929e4c3534ecdc6c11921dff5a54597c5d61ca6a (diff)
downloadlinux-55e78c933d747ed44b2b22879e6a55e5af34b9f7.tar.xz
mm: zswap: increase reject_compress_poor but not reject_compress_fail if compression returns ENOSPC
We used to rely on the returned -ENOSPC of zpool_malloc() to increase reject_compress_poor. But the code wouldn't get to there after commit 744e1885922a ("crypto: scomp - fix req->dst buffer overflow") as the new code will goto out immediately after the special compression case happens. So there might be no longer a chance to execute zpool_malloc now. We are incorrectly increasing zswap_reject_compress_fail instead. Thus, we need to fix the counters handling right after compressions return ENOSPC. This patch also centralizes the counters handling for all of compress_poor, compress_fail and alloc_fail. Link: https://lkml.kernel.org/r/20240219211935.72394-1-21cnbao@gmail.com Fixes: 744e1885922a ("crypto: scomp - fix req->dst buffer overflow") Signed-off-by: Barry Song <v-songbaohua@oppo.com> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Reviewed-by: Nhat Pham <nphamcs@gmail.com> Acked-by: Yosry Ahmed <yosryahmed@google.com> Reviewed-by: Chengming Zhou <zhouchengming@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'certs')
0 files changed, 0 insertions, 0 deletions