mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
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.
This commit is contained in:
parent
ba7772fee4
commit
8b330d7d75
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user