Merge tag 'linux_kselftest-kunit-fixes-6.8-rc3' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-block.git] / block / bfq-iosched.c
index 09bbbcf9e049d6e63aeaea9aad7cba1075b9fc90..3cce6de464a7b7c1b506158d044b537510a3e6f8 100644 (file)
@@ -5528,16 +5528,16 @@ bfq_set_next_ioprio_data(struct bfq_queue *bfqq, struct bfq_io_cq *bic)
                bfqq->new_ioprio_class = task_nice_ioclass(tsk);
                break;
        case IOPRIO_CLASS_RT:
-               bfqq->new_ioprio = IOPRIO_PRIO_DATA(bic->ioprio);
+               bfqq->new_ioprio = IOPRIO_PRIO_LEVEL(bic->ioprio);
                bfqq->new_ioprio_class = IOPRIO_CLASS_RT;
                break;
        case IOPRIO_CLASS_BE:
-               bfqq->new_ioprio = IOPRIO_PRIO_DATA(bic->ioprio);
+               bfqq->new_ioprio = IOPRIO_PRIO_LEVEL(bic->ioprio);
                bfqq->new_ioprio_class = IOPRIO_CLASS_BE;
                break;
        case IOPRIO_CLASS_IDLE:
                bfqq->new_ioprio_class = IOPRIO_CLASS_IDLE;
-               bfqq->new_ioprio = 7;
+               bfqq->new_ioprio = IOPRIO_NR_LEVELS - 1;
                break;
        }
 
@@ -5834,7 +5834,7 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd,
                                       struct bfq_io_cq *bic,
                                       bool respawn)
 {
-       const int ioprio = IOPRIO_PRIO_DATA(bic->ioprio);
+       const int ioprio = IOPRIO_PRIO_LEVEL(bic->ioprio);
        const int ioprio_class = IOPRIO_PRIO_CLASS(bic->ioprio);
        struct bfq_queue **async_bfqq = NULL;
        struct bfq_queue *bfqq;