diff options
author | Li Zefan <[email protected]> | 2009-01-15 13:51:26 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2009-01-15 16:39:41 -0800 |
commit | 068b38c1fa7a9210608f27ac521897ccc5f9b726 (patch) | |
tree | 6ae0ca440bab074c03a4cd4528e8c1467458753f /fs/jbd2/commit.c | |
parent | 0eb253e223c88b982461e59154fcad1b82597592 (diff) |
memcg: fix a race when setting memory.swappiness
(suppose: memcg->use_hierarchy == 0 and memcg->swappiness == 60)
echo 10 > /memcg/0/swappiness |
mem_cgroup_swappiness_write() |
... | echo 1 > /memcg/0/use_hierarchy
| mkdir /mnt/0/1
| sub_memcg->swappiness = 60;
memcg->swappiness = 10; |
In the above scenario, we end up having 2 different swappiness
values in a single hierarchy.
We should hold cgroup_lock() when cheking cgrp->children list.
Signed-off-by: Li Zefan <[email protected]>
Acked-by: KAMEZAWA Hiroyuki <[email protected]>
Cc: Balbir Singh <[email protected]>
Cc: Paul Menage <[email protected]>
Cc: Daisuke Nishimura <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions