summaryrefslogtreecommitdiff
path: root/mm/zswap.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2023-06-23 16:58:19 -0700
committerAndrew Morton <akpm@linux-foundation.org>2023-06-23 16:58:19 -0700
commit63773d2b593d86440c3b96fd300ed80d00cd06ef (patch)
treeebc7b1e8f1c0ce535ef9c6120209d0e87d8d4b16 /mm/zswap.c
parentcf01724e2d73a90524450e3dd8798cfb9d7aca05 (diff)
parent814bc1de03ea4361101408e63a68e4b82aef22cb (diff)
Merge mm-hotfixes-stable into mm-stable to pick up depended-upon changes.
Diffstat (limited to 'mm/zswap.c')
-rw-r--r--mm/zswap.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mm/zswap.c b/mm/zswap.c
index c122f042a49d..87b204233115 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -1229,9 +1229,16 @@ static int zswap_frontswap_store(unsigned type, pgoff_t offset,
goto reject;
}
+ /*
+ * XXX: zswap reclaim does not work with cgroups yet. Without a
+ * cgroup-aware entry LRU, we will push out entries system-wide based on
+ * local cgroup limits.
+ */
objcg = get_obj_cgroup_from_page(page);
- if (objcg && !obj_cgroup_may_zswap(objcg))
- goto shrink;
+ if (objcg && !obj_cgroup_may_zswap(objcg)) {
+ ret = -ENOMEM;
+ goto reject;
+ }
/* reclaim space if needed */
if (zswap_is_full()) {