From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 09/26] make access() use mnt check Date: Sat, 23 Jun 2007 08:45:19 +0100 Message-ID: <20070623074519.GI27954@infradead.org> References: <20070622200303.82D9CC3A@kernel> <20070622200314.1310BD44@kernel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: akpm@osdl.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, viro@ftp.linux.org.uk To: Dave Hansen Return-path: Received: from pentafluge.infradead.org ([213.146.154.40]:50299 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751476AbXFWHpW (ORCPT ); Sat, 23 Jun 2007 03:45:22 -0400 Content-Disposition: inline In-Reply-To: <20070622200314.1310BD44@kernel> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Jun 22, 2007 at 01:03:14PM -0700, Dave Hansen wrote: > > It is OK to let access() go without using a mnt_want/drop_write() > pair because it doesn't actually do writes to the filesystem, > and it is inherently racy anyway. This is a rare case when it is > OK to use __mnt_is_readonly() directly. You probably want to add a big comment explaining why it's fine here. That reminds me of something else I had in mind to debug that the writer counts are okay: we should probably add a check in permission that we have an elevated writercount on the vfsmount/sb. Of course we'll need some way to overrid it for access(), which means passing down a flag to it or something.