Re: [nameidata 1/2] Don't pass NULL nameidata to vfs_create

Matthew Wilcox
2007-04-16T16:25:34Z

On Mon, Apr 16, 2007 at 06:11:30PM +0200, Andreas Gruenbacher wrote:
> +static inline int
> +nfsd_do_create(struct inode *dir, struct dentry *child, struct vfsmount *mnt,
> + int mode)
> +{
> + struct nameidata nd = {
> + .dentry = child,
> + .mnt = mnt,
> + };
> +
> + return vfs_create(dir, child, mode, &nd);
> +}
> +

Wouldn't it normally result in fewer instructions (on most architectures
... maybe not x86) to keep the same argument order as vfs_create? ie:

static inline int nfsd_do_create(struct inode *dir, struct dentry *child,
int mode, struct vfsmount *mnt)