]> git.proxmox.com Git - lxcfs.git/blame - debian/patches/extra/0001-cgv2-assume-swap-is-supported.patch
update patches for 4.0.12
[lxcfs.git] / debian / patches / extra / 0001-cgv2-assume-swap-is-supported.patch
CommitLineData
47819977
WB
1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3Date: Thu, 2 Dec 2021 13:05:28 +0100
4Subject: [PATCH lxcfs] cgv2: assume swap is supported
5
6because this is just wrong and fixing it is annoying
7
8Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9---
10 src/cgroups/cgfsng.c | 10 ++++------
11 1 file changed, 4 insertions(+), 6 deletions(-)
12
13diff --git a/src/cgroups/cgfsng.c b/src/cgroups/cgfsng.c
14index 3eb4227..fed7911 100644
15--- a/src/cgroups/cgfsng.c
16+++ b/src/cgroups/cgfsng.c
17@@ -626,12 +626,10 @@ static bool cgfsng_can_use_swap(struct cgroup_ops *ops)
18 return false;
19
20 if (is_unified_hierarchy(h)) {
21- if (faccessat(h->fd, "memory.swap.max", F_OK, 0))
22- return false;
23-
24- if (faccessat(h->fd, "memory.swap.current", F_OK, 0))
25- return false;
26-
27+ /* the files to check for don't exist at the root cgroup
28+ * directory so let's assume yes, other kernel configs are
29+ * simply not supported on pve
30+ */
31 has_swap = true;
32 } else {
33 if (faccessat(h->fd, "memory.memsw.limit_in_bytes", F_OK, 0))