From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 14/21] FS-Cache: Avoid ENFILE checking for kernel-specific open files Date: Thu, 6 Jul 2006 18:56:08 -0700 Message-ID: <20060706185608.a1ff2321.akpm@osdl.org> References: <20060706145424.18779.55583.stgit@lade.trondhjem.org> <20060706151052.18779.43880.stgit@lade.trondhjem.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, David Howells Return-path: Received: from smtp.osdl.org ([65.172.181.4]:28801 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750925AbWGGB42 (ORCPT ); Thu, 6 Jul 2006 21:56:28 -0400 To: Trond Myklebust In-Reply-To: <20060706151052.18779.43880.stgit@lade.trondhjem.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 06 Jul 2006 11:10:53 -0400 Trond Myklebust wrote: > --- a/fs/file_table.c > +++ b/fs/file_table.c > - if (get_nr_files() >= files_stat.max_files && !capable(CAP_SYS_ADMIN)) { > + if (!(kflags & FKFLAGS_NO_ENFILE) && > + get_nr_files() >= files_stat.max_files && > + !capable(CAP_SYS_ADMIN) > + ) { Somebody's just going to put this back to kernel-style later anyway. We might as well get it correct up-front.