From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Morris Subject: Re: [PATCH 08/11] NFS: Introduce lifecycle management for label attribute. Date: Thu, 28 Feb 2008 15:13:07 +1100 (EST) Message-ID: References: <1204150294-4678-1-git-send-email-dpquigl@tycho.nsa.gov> <1204150294-4678-9-git-send-email-dpquigl@tycho.nsa.gov> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: hch@infradead.org, viro@ftp.linux.org.uk, trond.myklebust@fys.uio.no, bfields@fieldses.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: "David P. Quigley" Return-path: Received: from namei.org ([69.55.235.186]:53343 "EHLO us.intercode.com.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751978AbYB1ENd (ORCPT ); Wed, 27 Feb 2008 23:13:33 -0500 In-Reply-To: <1204150294-4678-9-git-send-email-dpquigl@tycho.nsa.gov> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, 27 Feb 2008, David P. Quigley wrote: > +#ifdef CONFIG_NFS_V4_SECURITY_LABEL > + if (nfs_server_capable(dir, NFS_CAP_SECURITY_LABEL)) > + nfs_fattr_alloc(&fattr, GFP_NOWAIT); > +#endif There are at least ten instances of the above. (Why do some of them use GFP_NOWAIT ?) > +#ifdef CONFIG_NFS_V4_SECURITY_LABEL > + if (server->caps & NFS_CAP_SECURITY_LABEL) { > + nfs_fattr_alloc(&fattr, GFP_KERNEL); > + nfs_fattr_alloc(&dir_fattr, GFP_KERNEL); > + } And a few of these. Static inline them, please. > +#define nfs_fattr_alloc(fattr, flags) > +#define nfs_fattr_fini(fattr) The preferred way to do this in Linux is as a static inline. - James -- James Morris