lkml.org 
[lkml]   [2012]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/10] cgroup: introduce struct cfent
On 03/20/2012 08:49 PM, Tejun Heo wrote:
> On Tue, Mar 20, 2012 at 08:03:03PM +0400, Glauber Costa wrote:
>> From 04604201411ab0a14fa1447072cd1b273d0774ed Mon Sep 17 00:00:00 2001
>> From: Glauber Costa<glommer@parallels.com>
>> Date: Tue, 20 Mar 2012 18:12:55 +0400
>> Subject: [PATCH] don't trigger warning when d_subdirs is not empty.
>>
>> It is never empty at this point, because of the self references.
>> a better test is to see if any of them gets d_inode set.
>>
>> Signed-off-by: Glauber Costa<glommer@parallels.com>
>> Signed-off-by: Tejun Heo<tj@kernel.org>
>> ---
>> kernel/cgroup.c | 8 +++++++-
>> 1 files changed, 7 insertions(+), 1 deletions(-)
>>
>> diff --git a/kernel/cgroup.c b/kernel/cgroup.c
>> index cf7b298..b45a653 100644
>> --- a/kernel/cgroup.c
>> +++ b/kernel/cgroup.c
>> @@ -947,10 +947,16 @@ static int cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft)
>> static void cgroup_clear_directory(struct dentry *dir)
>> {
>> struct cgroup *cgrp = __d_cgrp(dir);
>> + struct list_head *child;
>>
>> while (!list_empty(&cgrp->files))
>> cgroup_rm_file(cgrp, NULL);
>> - WARN_ON_ONCE(!list_empty(&dir->d_subdirs));
>> +
>> + list_for_each(child,&dir->d_subdirs) {
>> + struct dentry *d;
>> + d = list_entry(child, struct dentry, d_u.d_child);
>> + WARN_ON_ONCE(d->d_inode);
>> + }
>
> This seems correct and I'll apply this but I still can't reproduce the
> warning at will before the patch. How do I a get negative dentry on
> the d_subdirs when d_delete always returns 1? Glauber, can you
> trigger the warning at will?
>
> Thanks.
Yes, everytime I reboot the machine.





\
 
 \ /
  Last update: 2012-03-20 17:55    [W:0.048 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site