fs: aio ioprio use ioprio_check_cap ret val
authorAdam Manzanares <adam.manzanares@wdc.com>
Mon, 4 Jun 2018 17:59:57 +0000 (10:59 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 4 Jun 2018 18:20:39 +0000 (14:20 -0400)
Previously the value was ignored.

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/aio.c

index 9527ede..134e5b6 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1443,8 +1443,8 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb)
                 */
                ret = ioprio_check_cap(iocb->aio_reqprio);
                if (ret) {
-                       pr_debug("aio ioprio check cap error\n");
-                       return -EINVAL;
+                       pr_debug("aio ioprio check cap error: %d\n", ret);
+                       return ret;
                }
 
                req->ki_ioprio = iocb->aio_reqprio;