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 cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html