aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ioprio.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ioprio.c')
-rw-r--r--fs/ioprio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ioprio.c b/fs/ioprio.c
index 663e420636d6..d1c1f2b2c9da 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -43,7 +43,7 @@ static int set_task_ioprio(struct task_struct *task, int ioprio)
43 return 0; 43 return 0;
44} 44}
45 45
46asmlinkage int sys_ioprio_set(int which, int who, int ioprio) 46asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
47{ 47{
48 int class = IOPRIO_PRIO_CLASS(ioprio); 48 int class = IOPRIO_PRIO_CLASS(ioprio);
49 int data = IOPRIO_PRIO_DATA(ioprio); 49 int data = IOPRIO_PRIO_DATA(ioprio);
@@ -62,6 +62,8 @@ asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
62 62
63 break; 63 break;
64 case IOPRIO_CLASS_IDLE: 64 case IOPRIO_CLASS_IDLE:
65 if (!capable(CAP_SYS_ADMIN))
66 return -EPERM;
65 break; 67 break;
66 default: 68 default:
67 return -EINVAL; 69 return -EINVAL;
@@ -115,7 +117,7 @@ asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
115 return ret; 117 return ret;
116} 118}
117 119
118asmlinkage int sys_ioprio_get(int which, int who) 120asmlinkage long sys_ioprio_get(int which, int who)
119{ 121{
120 struct task_struct *g, *p; 122 struct task_struct *g, *p;
121 struct user_struct *user; 123 struct user_struct *user;