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

From: James Morris
Date: Wed Feb 27 2008 - 23:13:49 EST


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@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/