diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2017-10-04 18:49:01 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-10-10 12:45:39 +0300 |
commit | 36436440cd19f59f5be12a1b181d299af2725140 (patch) | |
tree | 198664cef7595febf4114aadc2c822db4d434e9b /include/linux/ioprio.h | |
parent | ff0d4a9dc16b1f4c954f6407c233ab848bdfe8b0 (diff) | |
download | linux-36436440cd19f59f5be12a1b181d299af2725140.tar.xz |
block/ioprio: Use a helper to check for RT prio
A side-effect to the old code is that now SCHED_DEADLINE is also
recognized.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jens Axboe <axboe@fb.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20171004154901.26904-2-bigeasy@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/ioprio.h')
-rw-r--r-- | include/linux/ioprio.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 8c1239020d79..2f19aab84a4a 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h @@ -2,6 +2,7 @@ #define IOPRIO_H #include <linux/sched.h> +#include <linux/sched/rt.h> #include <linux/iocontext.h> /* @@ -62,7 +63,7 @@ static inline int task_nice_ioclass(struct task_struct *task) { if (task->policy == SCHED_IDLE) return IOPRIO_CLASS_IDLE; - else if (task->policy == SCHED_FIFO || task->policy == SCHED_RR) + else if (task_is_realtime(task)) return IOPRIO_CLASS_RT; else return IOPRIO_CLASS_BE; |