]>
Commit | Line | Data |
---|---|---|
47819977 WB |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
3 | Date: Thu, 2 Dec 2021 13:05:28 +0100 | |
4 | Subject: [PATCH lxcfs] cgv2: assume swap is supported | |
5 | ||
6 | because this is just wrong and fixing it is annoying | |
7 | ||
8 | Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
9 | --- | |
10 | src/cgroups/cgfsng.c | 10 ++++------ | |
11 | 1 file changed, 4 insertions(+), 6 deletions(-) | |
12 | ||
13 | diff --git a/src/cgroups/cgfsng.c b/src/cgroups/cgfsng.c | |
14 | index 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)) |