From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH 09/10] cgroup: introduce struct cfent Date: Tue, 20 Mar 2012 18:05:29 +0400 Message-ID: <4F688EA9.8050905@parallels.com> References: <1331940963-15756-1-git-send-email-tj@kernel.org> <1331940963-15756-10-git-send-email-tj@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1331940963-15756-10-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Tejun Heo Cc: ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, fweisbec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: containers.vger.kernel.org On 03/17/2012 03:36 AM, Tejun Heo wrote: > +static void cgroup_clear_directory(struct dentry *dir) > +{ > + struct cgroup *cgrp = __d_cgrp(dir); > + > + while (!list_empty(&cgrp->files)) > + cgroup_rm_file(cgrp, NULL); > + WARN_ON_ONCE(!list_empty(&dir->d_subdirs)); > } I am hitting this warning here under pretty much normal conditions. You forgot to account for trivial directories like "." I'll send a patch ontop of what you have.