From: Damien Le Moal Date: Tue, 20 Nov 2018 01:52:36 +0000 (+0900) Subject: aio: Fix fallback I/O priority value X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=76dc891395dc61e92e2ff31b6161815ce5eb715b;p=linux.git aio: Fix fallback I/O priority value 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 Reviewed-by: Johannes Thumshirn Reviewed-by: Adam Manzanares Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe --- diff --git a/fs/aio.c b/fs/aio.c index 301e6314183b6..b984918be4b7f 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -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))