[linux-cifs-client] Re: review 2, was Re: projected date for mount.cifs to support DFS junction points

Steve French smfrench at gmail.com
Sun Jan 13 21:35:45 GMT 2008


I agree that CIFSGetDFSRefer needs to be reworked to be easier to
read.  This was one of the reasons that I wanted to look at this
particular patch more.

On Jan 13, 2008 1:48 PM, Christoph Hellwig <hch at infradead.org> wrote:
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3879,8 +3879,8 @@ GetInodeNumOut:
>  int
>  CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses,
>                 const unsigned char *searchName,
> -               unsigned char **targetUNCs,
> -               unsigned int *number_of_UNC_in_array,
> +               struct dfs_info3_param **targetNode,
> +               unsigned int *number_of_Nodes_in_array,
>                 const struct nls_table *nls_codepage, int remap)
>
> This function already was huge before the patch and grows even more.
> Please consider refactoring it into small, readable helpers.
>
>
> +       cFYI(1,
> +                       ("Decoding GetDFSRefer response BCC: %d  Offset %d",
> +                        pSMBr->ByteCount, data_offset));
>
> Very strange formatting..
>
> +/* BB: Probably we do not need this function any more.
> + * Anyway it never worked. May be one day we well need it.
> + */
>  int
>  connect_to_dfs_path(int xid, struct cifsSesInfo *pSesInfo,
>                     const char *old_path, const struct nls_table *nls_codepage,
>                     int remap)
>  {
> +       /*
>
> Please just remove such dead code entirely.  If people want to resurrect
> it for some reason they still have the git archives.
>
>



-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list