Skip to content

Commit

Permalink
aio: Fix fallback I/O priority value
Browse files Browse the repository at this point in the history
For cases when the application does not specify aio_reqprio for an aio,
fallback to use get_current_ioprio() to obtain the task I/O priority
last set using ioprio_set() rather than the hardcoded IOPRIO_CLASS_NONE
value.

Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Adam Manzanares <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
damien-lemoal authored and axboe committed Nov 20, 2018
1 parent 64845a1 commit 76dc891
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)

req->ki_ioprio = iocb->aio_reqprio;
} else
req->ki_ioprio = IOPRIO_PRIO_VALUE(IOPRIO_CLASS_NONE, 0);
req->ki_ioprio = get_current_ioprio();

ret = kiocb_set_rw_flags(req, iocb->aio_rw_flags);
if (unlikely(ret))
Expand Down

0 comments on commit 76dc891

Please sign in to comment.