Re: [PATCH] sysfs: fix namespace refcnt leak
From: Tejun Heo <hidden>
Date: 2014-02-20 14:30:24
Also in:
lkml
Hello, Li. On Wed, Feb 19, 2014 at 09:39:28AM +0800, Li Zefan wrote:
quoted
Can we make it optional so that users who don't care about it can ignore it?cgroupfs also needs this to fix refcnt leak.
Ah, okay.
Because success in finding an existing cgroup_root doesn't mean no new superblock is needed. For example: # mount -t cgroup -o cpuacct xxx /cgroup # mkdir /cgroup/tmp # umount /cgroup <--- sb will be freed but cgroup_root won't // this will allocate new sb, but we find the cgroup_root is there. # mount -t cgroup -o cpuacct xxx /cgroup But debugfs won't need this if it's converted to kernfs. How about I keep kernfs_mount() API intact, and when this fix gets merged into mainline, you merge the fix into cgroup-next, and then I make a fix for cgroup by changing kernfs_mount()?
If we need kernfs_mount() modified anyway, let's do it in this patch. I still think it'd be better to allow the parameter to be NULL but other than that, no objection. Thanks! -- tejun