diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2017-10-04 17:49:01 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-10-10 11:45:39 +0200 |
commit | 36436440cd19f59f5be12a1b181d299af2725140 (patch) | |
tree | 198664cef7595febf4114aadc2c822db4d434e9b | |
parent | ff0d4a9dc16b1f4c954f6407c233ab848bdfe8b0 (diff) |
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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-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; |