Commit:     8ec680e4c3ec818efd1652f15199ed1c216ab550
Parent:     0e7be9edb9134f833278c381b6feabb54b875208
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 7 13:54:07 2007 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Wed Nov 7 13:54:07 2007 +0100

    ioprio: allow sys_ioprio_set() value of 0 to reset ioprio setting
    Normally io priorities follow the CPU nice, unless a specific scheduling
    class has been set. Once that is set, there's no way to reset the
    behaviour to 'none' so that it follows CPU nice again.
    Currently passing in 0 as the ioprio class/value will return -1/EINVAL,
    change that to allow resetting of a set scheduling class.
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
 fs/ioprio.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fs/ioprio.c b/fs/ioprio.c
index d6ff77e..e4e01bc 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -78,6 +78,10 @@ asmlinkage long sys_ioprio_set(int which, int who, int 
                        if (!capable(CAP_SYS_ADMIN))
                                return -EPERM;
+               case IOPRIO_CLASS_NONE:
+                       if (data)
+                               return -EINVAL;
+                       break;
                        return -EINVAL;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to