Re: [PATCH v3] statx: optimize copy of struct statx to userspace
From: Eric Biggers
Date: Sun Mar 12 2017 - 21:00:48 EST
On Sun, Mar 12, 2017 at 09:11:53AM +0000, David Howells wrote:
> Eric Biggers <ebiggers3@xxxxxxxxx> wrote:
> > +static int cp_statx(const struct kstat *stat, struct statx __user *buffer)
> > ...
> > + struct statx tmp;
> This function needs to be "noinline" as tmp is big.
> > - return statx_set_result(&stat, buffer);
> > +
> > + return cp_statx(&stat, buffer);
> Can you leave it as statx_set_result rather than renaming it to cp_statx?
I agree with using 'noinline'.
But I think the name "cp_statx()" is better because it's consistent with the
existing functions in the file: