Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8ec680e4c3ec818efd1652f15199ed1c216ab550
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 
ioprio)
                        if (!capable(CAP_SYS_ADMIN))
                                return -EPERM;
                        break;
+               case IOPRIO_CLASS_NONE:
+                       if (data)
+                               return -EINVAL;
+                       break;
                default:
                        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  http://vger.kernel.org/majordomo-info.html

Reply via email to