From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 15/13] sysfs: Protect sysfs_refresh_inode with inode mutex. Date: Sat, 07 Nov 2009 11:26:52 +0900 Message-ID: <4AF4DAEC.5010503@kernel.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Greg Kroah-Hartman , Kay Sievers , Greg KH , linux-kernel@vger.kernel.org, Cornelia Huck , linux-fsdevel@vger.kernel.org, Eric Dumazet , Benjamin LaHaise , Serge Hallyn To: "Eric W. Biederman" Return-path: Received: from hera.kernel.org ([140.211.167.34]:36034 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755373AbZKGC06 (ORCPT ); Fri, 6 Nov 2009 21:26:58 -0500 In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Eric W. Biederman wrote: > In general everything that writes to vfs inodes holds the > inode mutex, so hold the inode mutex over sysfs_refresh_inode. > The sysfs data structures don't need this but it looks like the > vfs might. > > Signed-off-by: Eric W. Biederman Acked-by: Tejun Heo Sidenote: Hmmm... Originally, sysfs completely depended on vfs locking but with sysfs_dirent separation, the tree structure itself and some attributes went under the protection of sysfs_mutex while leaving more vfs oriented fields under vfs locking. This patchset makes sysfs lazier so it can't depend on any vfs layer locking. I think you've converted all necessary places while removing dependency on dentry/inode from update operations but it might be a good idea to do a audit pass over how fields are being protected now. Thanks for your patience. -- tejun