[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180604175957.2647-1-adam.manzanares@wdc.com>
Date: Mon, 4 Jun 2018 10:59:56 -0700
From: adam.manzanares@....com
To: viro@...iv.linux.org.uk, linux-fsdevel@...r.kernel.org
Cc: axboe@...nel.dk, bcrl@...ck.org, mingo@...nel.org,
tglx@...utronix.de, kstewart@...uxfoundation.org,
peterz@...radead.org, pombredanne@...b.com,
gregkh@...uxfoundation.org, bigeasy@...utronix.de,
rgoldwyn@...e.com, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-aio@...ck.org,
linux-api@...r.kernel.org, hch@...radread.org, jmoyer@...hat.com,
willy@...radead.org, smfrench@...il.com,
Adam Manzanares <adam.manzanares@....com>
Subject: [PATCH 1/2] fs: aio ioprio add explicit block layer dependence
From: Adam Manzanares <adam.manzanares@....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@....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
Powered by blists - more mailing lists