From: Sebastian Andrzej Siewior Date: Wed, 4 Oct 2017 15:49:01 +0000 (+0200) Subject: block/ioprio: Use a helper to check for RT prio X-Git-Tag: v4.15-rc1~158^2~19 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=36436440cd19f59f5be12a1b181d299af2725140;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Peter Zijlstra (Intel) Cc: Jens Axboe Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20171004154901.26904-2-bigeasy@linutronix.de Signed-off-by: Ingo Molnar --- diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 8c1239020d79d..2f19aab84a4a1 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h @@ -2,6 +2,7 @@ #define IOPRIO_H #include +#include #include /* @@ -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;