unix_convert() and amount of stat() calls
Jeremy Allison
jra at samba.org
Thu Sep 9 09:20:32 MDT 2010
On Thu, Sep 09, 2010 at 11:43:54AM +0200, Stefan (metze) Metzmacher wrote:
>
> You mean we only do this, correct?
> path\to\some\dir\with\files = OK
Err. Yes :-).
> + if (posix_pathnames) {
> + ret = SMB_VFS_LSTAT(conn, &parent_fname);
> + } else {
> + ret = SMB_VFS_STAT(conn, &parent_fname);
> + }
> + if (ret == 0) {
> + status = check_for_dot_component(&parent_fname);
> + if (!NT_STATUS_IS_OK(status)) {
> + goto fail;
> + }
> +
> + start = smb_fname->base_name +
> + strlen(parent_fname.base_name);
> +
> + DEBUG(5,("unix_convert optimize2: name "
> + "= %s, dirpath = %s, "
> + "start = %s\n",
> + smb_fname->base_name,
> + dirpath,
> + start));
>
> Don't we need a 'goto done;' here?
*Probably*. I thought about adding that but didn't do so
explicitly as I need to think more about what the loop
below will do, and wasn't 100% sure there were no side
effects, so I thought it was less harmful to just go
through the code in the same way as before.
Jeremy.
More information about the samba-technical
mailing list