mirror of
https://github.com/adulau/aha.git
synced 2024-12-30 12:46:17 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: sched: group scheduler, set uid share fix
This commit is contained in:
commit
b2214fca2b
1 changed files with 8 additions and 0 deletions
|
@ -7153,6 +7153,14 @@ int sched_group_set_shares(struct task_group *tg, unsigned long shares)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* A weight of 0 or 1 can cause arithmetics problems.
|
||||||
|
* (The default weight is 1024 - so there's no practical
|
||||||
|
* limitation from this.)
|
||||||
|
*/
|
||||||
|
if (shares < 2)
|
||||||
|
shares = 2;
|
||||||
|
|
||||||
spin_lock(&tg->lock);
|
spin_lock(&tg->lock);
|
||||||
if (tg->shares == shares)
|
if (tg->shares == shares)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
Loading…
Reference in a new issue