LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] fs: aio ioprio add explicit block layer dependence
@ 2018-06-04 17:59 adam.manzanares
  2018-06-04 17:59 ` [PATCH 2/2] fs: aio ioprio use ioprio_check_cap ret val adam.manzanares
  0 siblings, 1 reply; 2+ messages in thread
From: adam.manzanares @ 2018-06-04 17:59 UTC (permalink / raw)
  To: viro, linux-fsdevel
  Cc: axboe, bcrl, mingo, tglx, kstewart, peterz, pombredanne, gregkh,
	bigeasy, rgoldwyn, linux-block, linux-kernel, linux-aio,
	linux-api, hch, jmoyer, willy, smfrench, Adam Manzanares

From: Adam Manzanares <adam.manzanares@wdc.com>

Previously, the ioprio_check_cap function was only defined when CONFIG_BLOCK
was set. Make this relationship explicit and add a stub for !CONFIG_BLOCK.

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
---
 include/linux/ioprio.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 4a28cec49ec3..9e30ed6443db 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -77,6 +77,13 @@ extern int ioprio_best(unsigned short aprio, unsigned short bprio);
 
 extern int set_task_ioprio(struct task_struct *task, int ioprio);
 
+#ifdef CONFIG_BLOCK
 extern int ioprio_check_cap(int ioprio);
+#else
+static inline int ioprio_check_cap(int ioprio)
+{
+	return -ENOTBLK;
+}
+#endif /* CONFIG_BLOCK */
 
 #endif
-- 
2.17.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] fs: aio ioprio use ioprio_check_cap ret val
  2018-06-04 17:59 [PATCH 1/2] fs: aio ioprio add explicit block layer dependence adam.manzanares
@ 2018-06-04 17:59 ` adam.manzanares
  0 siblings, 0 replies; 2+ messages in thread
From: adam.manzanares @ 2018-06-04 17:59 UTC (permalink / raw)
  To: viro, linux-fsdevel
  Cc: axboe, bcrl, mingo, tglx, kstewart, peterz, pombredanne, gregkh,
	bigeasy, rgoldwyn, linux-block, linux-kernel, linux-aio,
	linux-api, hch, jmoyer, willy, smfrench, Adam Manzanares

From: Adam Manzanares <adam.manzanares@wdc.com>

Previously the value was ignored.

Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com>
---
 fs/aio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index 9527ededa669..134e5b635d64 100644
--- 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;
-- 
2.17.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-06-04 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 17:59 [PATCH 1/2] fs: aio ioprio add explicit block layer dependence adam.manzanares
2018-06-04 17:59 ` [PATCH 2/2] fs: aio ioprio use ioprio_check_cap ret val adam.manzanares

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).