From aa43457799f715d76cb77342baab0615877e2b8a Mon Sep 17 00:00:00 2001 From: Adam Manzanares Date: Tue, 22 May 2018 10:52:17 -0700 Subject: 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 Reviewed-by: Christoph Hellwig Reviewed-by: Jeff Moyer Signed-off-by: Al Viro --- include/linux/ioprio.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/ioprio.h') 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 -- cgit v1.2.3-55-g7522