[Bluetooth] Add support for extended inquiry responses
[pandora-kernel.git] / fs / ioprio.c
index 663e420..d1c1f2b 100644 (file)
@@ -43,7 +43,7 @@ static int set_task_ioprio(struct task_struct *task, int ioprio)
        return 0;
 }
 
-asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
+asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
 {
        int class = IOPRIO_PRIO_CLASS(ioprio);
        int data = IOPRIO_PRIO_DATA(ioprio);
@@ -62,6 +62,8 @@ asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
 
                        break;
                case IOPRIO_CLASS_IDLE:
+                       if (!capable(CAP_SYS_ADMIN))
+                               return -EPERM;
                        break;
                default:
                        return -EINVAL;
@@ -115,7 +117,7 @@ asmlinkage int sys_ioprio_set(int which, int who, int ioprio)
        return ret;
 }
 
-asmlinkage int sys_ioprio_get(int which, int who)
+asmlinkage long sys_ioprio_get(int which, int who)
 {
        struct task_struct *g, *p;
        struct user_struct *user;