summaryrefslogtreecommitdiff
path: root/include/linux/ioprio.h
diff options
context:
space:
mode:
authorAdam Manzanares <adam.manzanares@wdc.com>2018-06-04 20:59:56 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2018-06-04 21:20:39 +0300
commitb0966e7b894035dba6710aa4e9f18d7a3a3d5b22 (patch)
treec1c6f9f8987796e73d49ad144283f2ffd53a83a4 /include/linux/ioprio.h
parent087e566916ce2cde4f20a148607c9c3591f46f67 (diff)
downloadlinux-b0966e7b894035dba6710aa4e9f18d7a3a3d5b22.tar.xz
fs: aio ioprio add explicit block layer dependence
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>
Diffstat (limited to 'include/linux/ioprio.h')
-rw-r--r--include/linux/ioprio.h7
1 files changed, 7 insertions, 0 deletions
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