summaryrefslogtreecommitdiffstats
path: root/include/linux/ioprio.h
diff options
context:
space:
mode:
authorAdam Manzanares2018-05-22 19:52:17 +0200
committerAl Viro2018-05-31 16:50:54 +0200
commitaa43457799f715d76cb77342baab0615877e2b8a (patch)
treedf9115b36ef602d0550e9c2626b5c53a705425ac /include/linux/ioprio.h
parentaio: sanitize the limit checking in io_submit(2) (diff)
downloadkernel-qcow2-linux-aa43457799f715d76cb77342baab0615877e2b8a.tar.gz
kernel-qcow2-linux-aa43457799f715d76cb77342baab0615877e2b8a.tar.xz
kernel-qcow2-linux-aa43457799f715d76cb77342baab0615877e2b8a.zip
block: add ioprio_check_cap function
Aio per command iopriority support introduces a second interface between userland and the kernel capable of passing iopriority. The aio interface also needs the ability to verify that the submitting context has sufficient privileges to submit IOPRIO_RT commands. This patch creates the ioprio_check_cap function to be used by the ioprio_set system call and also by the aio interface. Signed-off-by: Adam Manzanares <adam.manzanares@wdc.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/ioprio.h')
-rw-r--r--include/linux/ioprio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ioprio.h b/include/linux/ioprio.h
index 627efac73e6d..4a28cec49ec3 100644
--- a/include/linux/ioprio.h
+++ b/include/linux/ioprio.h
@@ -77,4 +77,6 @@ extern int ioprio_best(unsigned short aprio, unsigned short bprio);
extern int set_task_ioprio(struct task_struct *task, int ioprio);
+extern int ioprio_check_cap(int ioprio);
+
#endif