From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751427AbdJDPtM (ORCPT ); Wed, 4 Oct 2017 11:49:12 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:58230 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751133AbdJDPtL (ORCPT ); Wed, 4 Oct 2017 11:49:11 -0400 From: Sebastian Andrzej Siewior To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Jens Axboe , tglx@linutronix.de, Sebastian Andrzej Siewior Subject: [PATCH 2/2] block/ioprio: use a helper to check for RT prio Date: Wed, 4 Oct 2017 17:49:01 +0200 Message-Id: <20171004154901.26904-2-bigeasy@linutronix.de> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20171004154901.26904-1-bigeasy@linutronix.de> References: <20171004154901.26904-1-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A side-effect to the old code is that now SCHED_DEADLINE is also recognized. Signed-off-by: Sebastian Andrzej Siewior --- include/linux/ioprio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h index 8c1239020d79..c8f3f0302220 100644 --- a/include/linux/ioprio.h +++ b/include/linux/ioprio.h @@ -2,6 +2,7 @@ #define IOPRIO_H =20 #include +#include #include =20 /* @@ -62,7 +63,7 @@ static inline int task_nice_ioclass(struct task_struct *t= ask) { if (task->policy =3D=3D SCHED_IDLE) return IOPRIO_CLASS_IDLE; - else if (task->policy =3D=3D SCHED_FIFO || task->policy =3D=3D SCHED_RR) + else if (task_is_elevated(task)) return IOPRIO_CLASS_RT; else return IOPRIO_CLASS_BE; --=20 2.14.2