Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-29 Thread Li Zefan
On 2014/6/28 19:58, Tejun Heo wrote: > Hello, Li. > > On Fri, Jun 27, 2014 at 05:13:12PM +0800, Li Zefan wrote: >> +for_each_subsys(ss, i) { >> +if (!(opts.subsys_mask & (1 << i)) || >> +ss->root == &cgrp_dfl_root) >> +continue; >> + >> +

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-28 Thread Tejun Heo
Hello, Li. On Fri, Jun 27, 2014 at 05:13:12PM +0800, Li Zefan wrote: > + for_each_subsys(ss, i) { > + if (!(opts.subsys_mask & (1 << i)) || > + ss->root == &cgrp_dfl_root) > + continue; > + > + if (!percpu_ref_tryget_live(&ss->root->c

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
Made a mistake again.. :( == From: Li Zefan Subject: [PATCH 1/3] cgroup: fix mount failure in a corner case # cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup umount /cgroup mount -t cgroup -o cpu,cpuacct xxx /cgroup umount /cgroup # ./test.sh mount: xx

Re: [PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
Oh sorry the cut&paste was incomplete. Here's the complete one: From: Li Zefan Date: Thu, 12 Jun 2014 09:11:00 +0800 Subject: [PATCH v2 1/3] cgroup: fix mount failure in a corner case # cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup umoun

[PATCH v2 1/3] cgroup: fix mount failure in a corner case

2014-06-27 Thread Li Zefan
# cat test.sh #! /bin/bash mount -t cgroup -o cpu xxx /cgroup umount /cgroup mount -t cgroup -o cpu,cpuacct xxx /cgroup umount /cgroup # ./test.sh mount: xxx already mounted or /mnt busy mount: according to mtab, xxx is already mounted on /mnt It's because the cgroupfs_root of