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

Dave Quigley
2008-02-28T16:49:18Z

I forgot to CC Matt on the posting of the patch set (I figured he was on
fsdevel or lkml) so I asked him about this and here is the response.

"The allocation flag used depends on where the call is made.
In some cases allocation is not permitted to wait, etc."

I'm assuming he felt that the sections marked NOWAIT could not wait for
memory allocation. If people want to review them, and find to the
contrary we can figure out what the correct ones are.

Dave

On Thu, 2008-02-28 at 15:13 +1100, James Morris wrote:
> 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