]> git.proxmox.com Git - lxcfs.git/blob - debian/patches/pve/0008-swap-Remove-now-unused-variable.patch
bump version to 4.0.6-pve1
[lxcfs.git] / debian / patches / pve / 0008-swap-Remove-now-unused-variable.patch
1 From 1d3a4a0dd7411d34f10e47c1d850213a63a3581e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@ubuntu.com>
3 Date: Thu, 5 Nov 2020 15:46:07 -0500
4 Subject: [PATCH lxcfs 8/8] swap: Remove now unused variable
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
10 ---
11 src/proc_fuse.c | 4 +---
12 1 file changed, 1 insertion(+), 3 deletions(-)
13
14 diff --git a/src/proc_fuse.c b/src/proc_fuse.c
15 index fc69789..9bf963b 100644
16 --- a/src/proc_fuse.c
17 +++ b/src/proc_fuse.c
18 @@ -325,7 +325,7 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
19 bool wants_swap = opts && !opts->swap_off && liblxcfs_can_use_swap();
20 struct file_info *d = INTTYPE_TO_PTR(fi->fh);
21 uint64_t memswlimit = 0, memlimit = 0, memusage = 0, memswusage = 0,
22 - swtotal = 0, swfree = 0, swusage = 0, memswpriority = 1
23 + swtotal = 0, swusage = 0, memswpriority = 1,
24 hostswtotal = 0, hostswfree = 0;
25 ssize_t total_len = 0;
26 ssize_t l = 0;
27 @@ -383,8 +383,6 @@ static int proc_swaps_read(char *buf, size_t size, off_t offset,
28 swusage = 0;
29 else
30 swusage = (memswusage - memusage) / 1024;
31 - if (swtotal >= swusage)
32 - swfree = swtotal - swusage;
33 }
34
35 ret = cgroup_ops->get_memory_swappiness(cgroup_ops, cgroup, &memswpriority_str);
36 --
37 2.20.1
38