summaryrefslogtreecommitdiff
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-12-07 14:55:27 +0100
committerMaria Matejka <mq@ucw.cz>2021-12-07 14:55:27 +0100
commitf9e098c98af98096c8f47a054b57cff63d345074 (patch)
tree81f98ca3307c7dccee606ecb4acbf09c493b3f81 /sysdep/unix
parent542f24555d9f7c98830ffbca29efc17151bed13b (diff)
Fixed standby memory page counters on shutdown
Bug introduced by commit 38278d94ba0a179d5eeb061a59850a4e1c150e5b.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdep/unix/alloc.c b/sysdep/unix/alloc.c
index 99bf349c..81cd19b4 100644
--- a/sysdep/unix/alloc.c
+++ b/sysdep/unix/alloc.c
@@ -60,7 +60,7 @@ alloc_page(void)
node *n = HEAD(fp->list);
rem_node(n);
- if (!shutting_down && (--fp->cnt < fp->min))
+ if ((--fp->cnt < fp->min) && !shutting_down)
ev_send(&global_work_list, fp->cleanup);
void *ptr = n - FP_NODE_OFFSET;
@@ -89,7 +89,7 @@ free_page(void *ptr)
memset(n, 0, sizeof(node));
add_tail(&fp->list, n);
- if (!shutting_down && (++fp->cnt > fp->max))
+ if ((++fp->cnt > fp->max) && !shutting_down)
ev_send(&global_work_list, fp->cleanup);
}
else