]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - kernel/sys.c
[PATCH] nice and rt-prio rlimits
[linux-2.6.git] / kernel / sys.c
index df2ddcc6863bcfd55ae808699eaf24852740047e..7f43d6e62c7a05641e6b54fcbb9ffda74a8ffcbb 100644 (file)
@@ -227,7 +227,7 @@ static int set_one_prio(struct task_struct *p, int niceval, int error)
                error = -EPERM;
                goto out;
        }
-       if (niceval < task_nice(p) && !capable(CAP_SYS_NICE)) {
+       if (niceval < task_nice(p) && !can_nice(p, niceval)) {
                error = -EACCES;
                goto out;
        }