[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120703171033.GC555@google.com>
Date: Tue, 3 Jul 2012 10:10:33 -0700
From: Tejun Heo <tj@...nel.org>
To: Al Viro <viro@...IV.linux.org.uk>
Cc: Li Zefan <lizefan@...wei.com>, shyju pv <shyju.pv@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
Sanil kumar <sanil.kumar@...wei.com>,
Masanari Iida <standby24x7@...il.com>
Subject: Re: 3.5-rc3: BUG: Dentry still in use (1) [unmount of cgroup
cgroup]
Hello, Al.
On Sat, Jun 30, 2012 at 09:34:21AM +0100, Al Viro wrote:
> Now that I've looked at that code again... What's the story with
> simple_unlink(d->d_inode, d);
> in cgroup_rm_file()? Wrong parent inode, at the very least...
Yeah, indeed. My mistake while refactoring the code. Will fix.
> While we are at it, what the hell is going on in
> static void cgroup_clear_directory(struct dentry *dir)
> {
> struct cgroup *cgrp = __d_cgrp(dir);
>
> while (!list_empty(&cgrp->files))
> cgroup_rm_file(cgrp, NULL);
> }
> Are you fighting some kind of race against somebody adding stuff
> there? Unless I'm seriously misreading cgroup_rm_file(), it'll
> do all the work on the first call...
cgroup_rm_file() finds the file matching @cft, deletes that one file
and returns. Passing in %NULL @cft makes it deletes the first file
but it still returns after deleting one. Maybe breaking up
list_for_each_entry() so that deletion and returning is outside the
loop would make that clearer.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists