Merge tag 'iommu-v4.15-rc1' of git://github.com/awilliam/linux-vfio
[linux-2.6-microblaze.git] / include / linux / ioprio.h
index 2cdd748..627efac 100644 (file)
@@ -3,6 +3,7 @@
 #define IOPRIO_H
 
 #include <linux/sched.h>
+#include <linux/sched/rt.h>
 #include <linux/iocontext.h>
 
 /*
@@ -63,7 +64,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;