[PATCH 3/7] block: Fix get_task_ioprio() default return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As explained in ioprio_get() and ionice man pages, the default I/O
priority class for processes which have not set an I/O priority using
ioprio_set() is IOPRIO_CLASS_BE and not IOPRIO_CLASS_NONE.

Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
---
 block/ioprio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/ioprio.c b/block/ioprio.c
index f9821080c92c..ea5be206eb26 100644
--- a/block/ioprio.c
+++ b/block/ioprio.c
@@ -163,7 +163,7 @@ static int get_task_ioprio(struct task_struct *p)
 	ret = security_task_getioprio(p);
 	if (ret)
 		goto out;
-	ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, IOPRIO_NORM);
+	ret = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_BE, IOPRIO_NORM);
 	task_lock(p);
 	if (p->io_context)
 		ret = p->io_context->ioprio;
-- 
2.19.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux