diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/cfq-iosched.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 6f2751d305de..b9abdca84c17 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -3656,12 +3656,17 @@ static struct cfq_queue * | |||
3656 | cfq_get_queue(struct cfq_data *cfqd, bool is_sync, struct cfq_io_cq *cic, | 3656 | cfq_get_queue(struct cfq_data *cfqd, bool is_sync, struct cfq_io_cq *cic, |
3657 | struct bio *bio, gfp_t gfp_mask) | 3657 | struct bio *bio, gfp_t gfp_mask) |
3658 | { | 3658 | { |
3659 | const int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio); | 3659 | int ioprio_class = IOPRIO_PRIO_CLASS(cic->ioprio); |
3660 | const int ioprio = IOPRIO_PRIO_DATA(cic->ioprio); | 3660 | int ioprio = IOPRIO_PRIO_DATA(cic->ioprio); |
3661 | struct cfq_queue **async_cfqq = NULL; | 3661 | struct cfq_queue **async_cfqq = NULL; |
3662 | struct cfq_queue *cfqq = NULL; | 3662 | struct cfq_queue *cfqq = NULL; |
3663 | 3663 | ||
3664 | if (!is_sync) { | 3664 | if (!is_sync) { |
3665 | if (!ioprio_valid(cic->ioprio)) { | ||
3666 | struct task_struct *tsk = current; | ||
3667 | ioprio = task_nice_ioprio(tsk); | ||
3668 | ioprio_class = task_nice_ioclass(tsk); | ||
3669 | } | ||
3665 | async_cfqq = cfq_async_queue_prio(cfqd, ioprio_class, ioprio); | 3670 | async_cfqq = cfq_async_queue_prio(cfqd, ioprio_class, ioprio); |
3666 | cfqq = *async_cfqq; | 3671 | cfqq = *async_cfqq; |
3667 | } | 3672 | } |