summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-11-24 15:39:43 +0100
committerLennart Poettering <lennart@poettering.net>2021-11-24 16:12:15 +0100
commit8b330d7d75b5dd861bb4f9abde98d517cdc77229 (patch)
treef5c7b16b67c32575b37fbe0ed0f845ecf0a1d614 /src/core
parentba7772fee445dd88438fb84477648a67821843d0 (diff)
downloadsystemd-8b330d7d75b5dd861bb4f9abde98d517cdc77229.tar.gz
core: normalize ioprio values we acquire from kernel
Linux 5.15 broke API in ioprio_get(): instead of returning IOPRIO_CLASS_NONE when that's set it now returns IOPRIO_CLASS_BE, which is what this actually is (the former is just an alias for the latter with a priority value of 4). Let's hide the differences between old and new kernels here, and always normalize to what the new kernels do.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/execute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index c30e15f614..aa1193e067 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -6023,7 +6023,7 @@ int exec_context_get_effective_ioprio(const ExecContext *c) {
if (p < 0)
return IOPRIO_DEFAULT_CLASS_AND_PRIO;
- return p;
+ return ioprio_normalize(p);
}
bool exec_context_get_effective_mount_apivfs(const ExecContext *c) {