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-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1331940963-15756-10-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> List-Id: 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 Content-Type: text/plain; charset="us-ascii"; format="flowed" 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 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760105Ab2CTOHI (ORCPT ); Tue, 20 Mar 2012 10:07:08 -0400 Received: from mx2.parallels.com ([64.131.90.16]:50238 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759284Ab2CTOHD (ORCPT ); Tue, 20 Mar 2012 10:07:03 -0400 Message-ID: <4F688EA9.8050905@parallels.com> Date: Tue, 20 Mar 2012 18:05:29 +0400 From: Glauber Costa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Tejun Heo CC: , , , , , , Subject: Re: [PATCH 09/10] cgroup: introduce struct cfent References: <1331940963-15756-1-git-send-email-tj@kernel.org> <1331940963-15756-10-git-send-email-tj@kernel.org> In-Reply-To: <1331940963-15756-10-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.