fs: aio ioprio add explicit block layer dependence
authorAdam Manzanares <adam.manzanares@wdc.com>
Mon, 4 Jun 2018 17:59:56 +0000 (10:59 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 4 Jun 2018 18:20:39 +0000 (14:20 -0400)
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/ioprio.h

index 4a28cec..9e30ed6 100644 (file)
@@ -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