From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 3/7] FS-Cache: Avoid ENFILE checking for kernel-specific open files Date: Fri, 21 Apr 2006 11:22:43 -0700 Message-ID: <20060421112243.4b435bc7.akpm@osdl.org> References: <20060420170754.39294603.akpm@osdl.org> <20060420165927.9968.33912.stgit@warthog.cambridge.redhat.com> <20060420165932.9968.40376.stgit@warthog.cambridge.redhat.com> <4816.1145622827@warthog.cambridge.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: aviro@redhat.com, sct@redhat.com, nfsv4@linux-nfs.org, steved@redhat.com, linux-kernel@vger.kernel.org, dhowells@redhat.com, torvalds@osdl.org, linux-cachefs@redhat.com, linux-fsdevel@vger.kernel.org Return-path: To: David Howells In-Reply-To: <4816.1145622827@warthog.cambridge.redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfsv4-bounces@linux-nfs.org Errors-To: nfsv4-bounces@linux-nfs.org List-Id: linux-fsdevel.vger.kernel.org David Howells wrote: > > > > +struct file *get_empty_filp(int kernel) > > > > I'd suggest a new get_empty_kernel_filp(void) rather than providing a magic > > argument. (we can still have the magic argument in the new > > __get_empty_filp(int), but it shouldn't be part of the caller-visible API). > > ... > > It would be more flexible to make the caller pass in the flags directly. > > So: > > struct file *get_empty_kernel_filp(unsigned short flags); > > which devolves to get_empty_filp() if flags == 0? > argh, I forgot about the flag. Oh well. I'd suggest: static inline struct file *get_empty_filp(void) { return __get_empty_filp(0); } static inline struct file *get_empty_kernel_filp(void) { return __get_empty_filp(0); }