Re: [PATCH 08/11] NFS: Introduce lifecycle management for label attribute.

James Morris
2008-02-28T04:13:44Z

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
<jmorris@namei.org>