summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-07-28 18:22:00 +0200
committerLennart Poettering <lennart@poettering.net>2021-07-28 18:39:41 +0200
commitc4412d4d33fcad06728ac02f3e673ac1081b5931 (patch)
treea2e269f6d3fd008c3f8a04c13f756884bf1d0746
parentupdate TODO (diff)
downloadsystemd-c4412d4d33fcad06728ac02f3e673ac1081b5931.tar.xz
systemd-c4412d4d33fcad06728ac02f3e673ac1081b5931.zip
Revert "Make oom_score_adjust_is_valid() static"
This reverts commit 6bf3c6c9007ca87376d5dff1e029186a38736cdc.
-rw-r--r--src/basic/process-util.c4
-rw-r--r--src/basic/process-util.h2
-rw-r--r--src/core/dbus-execute.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index ce4bfb783d..ecb14306f8 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -1037,6 +1037,10 @@ bool is_main_thread(void) {
return cached > 0;
}
+bool oom_score_adjust_is_valid(int oa) {
+ return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
+}
+
unsigned long personality_from_string(const char *p) {
int architecture;
diff --git a/src/basic/process-util.h b/src/basic/process-util.h
index a591fc32a4..c953649502 100644
--- a/src/basic/process-util.h
+++ b/src/basic/process-util.h
@@ -82,6 +82,8 @@ int pid_from_same_root_fs(pid_t pid);
bool is_main_thread(void);
+bool oom_score_adjust_is_valid(int oa);
+
#ifndef PERSONALITY_INVALID
/* personality(7) documents that 0xffffffffUL is used for querying the
* current personality, hence let's use that here as error
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index f7784bb73d..f6783e924a 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <linux/oom.h>
#include <sys/mount.h>
#include <sys/prctl.h>
@@ -95,10 +94,6 @@ static int property_get_environment_files(
return sd_bus_message_close_container(reply);
}
-static bool oom_score_adjust_is_valid(int oa) {
- return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX;
-}
-
static int property_get_oom_score_adjust(
sd_bus *bus,
const char *path,