From fc28724d67c90ff48b976e0687caf79993160bed Mon Sep 17 00:00:00 2001 From: Adam Manzanares Date: Tue, 22 May 2018 10:52:18 -0700 Subject: fs: Convert kiocb rw_hint from enum to u16 In order to avoid kiocb bloat for per command iopriority support, rw_hint is converted from enum to a u16. Added a guard around ki_hint assignment. Signed-off-by: Adam Manzanares Signed-off-by: Al Viro --- fs/aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/aio.c') diff --git a/fs/aio.c b/fs/aio.c index b850e92ee0d5..33299ece7540 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1434,7 +1434,7 @@ static int aio_prep_rw(struct kiocb *req, struct iocb *iocb) req->ki_flags = iocb_flags(req->ki_filp); if (iocb->aio_flags & IOCB_FLAG_RESFD) req->ki_flags |= IOCB_EVENTFD; - req->ki_hint = file_write_hint(req->ki_filp); + req->ki_hint = ki_hint_validate(file_write_hint(req->ki_filp)); ret = kiocb_set_rw_flags(req, iocb->aio_rw_flags); if (unlikely(ret)) fput(req->ki_filp); -- cgit v1.2.3