Small optimization patch in nfs4_acls.c to avoid refetching stat if we have it

Richard Sharpe realrichardsharpe at gmail.com
Thu Aug 3 16:14:55 UTC 2017


On Thu, Aug 3, 2017 at 9:07 AM, Ralph Böhme <slow at samba.org> wrote:
> Hi Richard,
>
> On Thu, Aug 03, 2017 at 08:32:47AM -0700, Richard Sharpe via samba-technical wrote:
>> This can reduce the number of stat calls we make ...
>
> is this really correct?
>
> Iirc and from briefly rechecking the code, the callers already do this
> check. Also smbacl4_GetFileOwner() looks like it's supposed to return stat info
> via the out arg psbuf, so if the statinfo of the smb_fname is valid, you should
> probably set *psbuf to smb_fname->st...

Oops, EPREMATUREPATCH.

Indeed, there needs to be an else clause that copies smb_fname->st to
*psbuf ... will send a new patch soonish.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list