Merge pull request #21503 from poettering/ioprio-fix
work around linux 5.15 ioprio API breakage
This commit is contained in:
+4
-3
@@ -63,6 +63,7 @@
|
||||
#include "glob-util.h"
|
||||
#include "hexdecoct.h"
|
||||
#include "io-util.h"
|
||||
#include "ioprio-util.h"
|
||||
#include "label.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
@@ -5068,7 +5069,7 @@ void exec_context_init(ExecContext *c) {
|
||||
assert(c);
|
||||
|
||||
c->umask = 0022;
|
||||
c->ioprio = ioprio_prio_value(IOPRIO_CLASS_BE, 0);
|
||||
c->ioprio = IOPRIO_DEFAULT_CLASS_AND_PRIO;
|
||||
c->cpu_sched_policy = SCHED_OTHER;
|
||||
c->syslog_priority = LOG_DAEMON|LOG_INFO;
|
||||
c->syslog_level_prefix = true;
|
||||
@@ -6020,9 +6021,9 @@ int exec_context_get_effective_ioprio(const ExecContext *c) {
|
||||
|
||||
p = ioprio_get(IOPRIO_WHO_PROCESS, 0);
|
||||
if (p < 0)
|
||||
return ioprio_prio_value(IOPRIO_CLASS_BE, 4);
|
||||
return IOPRIO_DEFAULT_CLASS_AND_PRIO;
|
||||
|
||||
return p;
|
||||
return ioprio_normalize(p);
|
||||
}
|
||||
|
||||
bool exec_context_get_effective_mount_apivfs(const ExecContext *c) {
|
||||
|
||||
Reference in New Issue
Block a user