]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "Make oom_score_adjust_is_valid() static"
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Jul 2021 16:22:00 +0000 (18:22 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 28 Jul 2021 16:39:41 +0000 (18:39 +0200)
This reverts commit 6bf3c6c9007ca87376d5dff1e029186a38736cdc.

src/basic/process-util.c
src/basic/process-util.h
src/core/dbus-execute.c

index ce4bfb783da121534f67162db335badf97b3f379..ecb14306f8b1ca64a1003115c6b4dc4cc598f3fd 100644 (file)
@@ -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;
 
index a591fc32a4ad3a29261415887ccc4fc87eb15422..c9536495023855d5e9a363818d2eeac87ba9f160 100644 (file)
@@ -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
index f7784bb73dce3c678f6b3ab701d87af42c58f8ba..f6783e924ab356e52747f3b44bc12dc599cfdd69 100644 (file)
@@ -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,