mm: zswap: further cleanup zswap_store()
authorJohannes Weiner <hannes@cmpxchg.org>
Tue, 30 Jan 2024 01:36:44 +0000 (20:36 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 22 Feb 2024 18:24:43 +0000 (10:24 -0800)
commitbe7fc97c52835b931682d79121530773b67e8307
tree4da817d3fa6f30e2cfa3312aef215f7c9cc18213
parentfa9ad6e21003691905f6caa307f9e5bf27ac1c23
mm: zswap: further cleanup zswap_store()

- Remove dupentry, reusing entry works just fine.
- Rename pool to shrink_pool, as this one actually is confusing.
- Remove page, use folio_nid() and kmap_local_folio() directly.
- Set entry->swpentry in a common path.
- Move value and src to local scope of use.

Link: https://lkml.kernel.org/r/20240130014208.565554-9-hannes@cmpxchg.org
Signed-off-by: Johannes Weiner <hannes@cmpxchg.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>
mm/zswap.c