Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755071AbYLOLKA (ORCPT ); Mon, 15 Dec 2008 06:10:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753378AbYLOLJw (ORCPT ); Mon, 15 Dec 2008 06:09:52 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:48040 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753356AbYLOLJv (ORCPT ); Mon, 15 Dec 2008 06:09:51 -0500 Date: Mon, 15 Dec 2008 20:08:49 +0900 From: KAMEZAWA Hiroyuki To: Peter Zijlstra Cc: Li Zefan , Ingo Molnar , Paul Menage , Andrew Morton , LKML Subject: Re: [PATCH] sched: fix another race when reading /proc/sched_debug Message-Id: <20081215200849.94b1b8de.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <1229337829.14605.41.camel@twins> References: <494234B0.5@cn.fujitsu.com> <20081212100044.GB18152@elte.hu> <4944754F.8050503@cn.fujitsu.com> <1229258890.17130.9.camel@lappy.programming.kicks-ass.net> <4945B200.7020207@cn.fujitsu.com> <1229328783.14605.11.camel@twins> <49462890.1040002@cn.fujitsu.com> <1229337829.14605.41.camel@twins> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.5.0 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 719 Lines: 24 On Mon, 15 Dec 2008 11:43:49 +0100 Peter Zijlstra wrote: > > + if (cgroup_is_removed(cgroup) || !cgroup->dentry) > > + return; > > cgroup_path(cgroup, path, sizeof(path)); > > + } > > Perhaps wrap that check in a cgroup_*() helper? That would avoid the > duplication, be clearer and not open code the ->dentry assumption. > > cgroup_is_active() perhaps? > I vote for cgroup_is_populated(). Thx, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/