From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764247AbZAWGcv (ORCPT ); Fri, 23 Jan 2009 01:32:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1761898AbZAWG2u (ORCPT ); Fri, 23 Jan 2009 01:28:50 -0500 Received: from hera.kernel.org ([140.211.167.34]:33974 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764404AbZAWG2t (ORCPT ); Fri, 23 Jan 2009 01:28:49 -0500 Message-ID: <4979637E.4070706@kernel.org> Date: Fri, 23 Jan 2009 15:28:14 +0900 From: Tejun Heo User-Agent: Thunderbird 2.0.0.19 (X11/20081227) MIME-Version: 1.0 To: "Eric W. Biederman" CC: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Al Viro , Cornelia Huck , Andrew Morton Subject: Re: [PATCH] sysfs: Take sysfs_mutex when fetching the root inode. References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (hera.kernel.org [127.0.0.1]); Fri, 23 Jan 2009 06:28:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eric W. Biederman wrote: > sysfs_get_inode ultimately calls sysfs_count_nlink when the a > directory inode is fectched. sysfs_count_nlink needs to be > called under the sysfs_mutex to guard against the unlikely > but possible scenario that the root directory is changing > as we are counting the number entries in it, and just in > general to be consistent. > > Signed-off-by: Eric W. Biederman Acked-by: Tejun Heo Thanks. -- tejun