[linux-cifs-client] [PATCH 2/6] cifs: move allocation of new TCP_Server_Info into separate function

Steve French smfrench at gmail.com
Sun Nov 30 20:41:45 GMT 2008


On Sun, Nov 30, 2008 at 10:46 AM, Christoph Hellwig <hch at infradead.org> wrote:
> On Sun, Nov 30, 2008 at 08:57:21AM -0500, Jeff Layton wrote:
>> +     struct TCP_Server_Info *srvTcp;
>
> No studdly caps, please.  Just call this info or srv_info.

Jeff,
I am glad that these are gradually being cleaned up, but it probably
would be easier to review some simple (albeit large) case rename
patches ... ie the rename  of the more frequently used variables and
structures from mixed case to Linux preferred style (lower case).

The particular example Christoph points out is an interesting one.
Although the case needs to be fixed, the difference between the
SMB/CIFS servers session info, and the server socket (TCP info) can be
confusing if we call them both something like srv_info.   There can be
multiple SMB server sessions (each with different credentials) hanging
off the tcp connection to a server.   To be consistent with the mount
changes that went into 2.6.28 (e.g. now the lists are called
tcp_ses_list and smb_ses_list), we could try variable names like
"smb_ses_info" and "tcp_ses_info" (depending on whether we are talking
about the tcp session or the smb session on top of it) which should be
clearer and more consistent.


-- 
Thanks,

Steve


More information about the linux-cifs-client mailing list