The patch titled cifs: cifs_find_tcp_session() cleanup has been removed from the -mm tree. Its filename was cifs-cifs_find_tcp_session-cleanup.patch This patch was dropped because it was withdrawn The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: cifs: cifs_find_tcp_session() cleanup From: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Remove over-indented code in cifs_find_tcp_session. Also memcmp was used wrongly - we would have found the session which IP6 addresses didn't match. Signed-off-by: Cyrill Gorcunov <gorcunov@xxxxxxxxx> Cc: Steven French <sfrench@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/cifs/connect.c | 56 ++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff -puN fs/cifs/connect.c~cifs-cifs_find_tcp_session-cleanup fs/cifs/connect.c --- a/fs/cifs/connect.c~cifs-cifs_find_tcp_session-cleanup +++ a/fs/cifs/connect.c @@ -1318,42 +1318,44 @@ cifs_parse_mount_options(char *options, static struct cifsSesInfo * cifs_find_tcp_session(struct in_addr *target_ip_addr, - struct in6_addr *target_ip6_addr, - char *userName, struct TCP_Server_Info **psrvTcp) + struct in6_addr *target_ip6_addr, + char *userName, struct TCP_Server_Info **psrvTcp) { struct list_head *tmp; struct cifsSesInfo *ses; + *psrvTcp = NULL; - read_lock(&GlobalSMBSeslock); + if (!target_ip_addr) + return NULL; + + read_lock(&GlobalSMBSeslock); list_for_each(tmp, &GlobalSMBSessionList) { ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList); - if (ses->server) { - if ((target_ip_addr && - (ses->server->addr.sockAddr.sin_addr.s_addr - == target_ip_addr->s_addr)) || (target_ip6_addr - && memcmp(&ses->server->addr.sockAddr6.sin6_addr, - target_ip6_addr, sizeof(*target_ip6_addr)))) { - /* BB lock server and tcp session and increment - use count here?? */ - - /* found a match on the TCP session */ - *psrvTcp = ses->server; - - /* BB check if reconnection needed */ - if (strncmp - (ses->userName, userName, - MAX_USERNAME_SIZE) == 0){ - read_unlock(&GlobalSMBSeslock); - /* Found exact match on both TCP and - SMB sessions */ - return ses; - } - } - } - /* else tcp and smb sessions need reconnection */ + if (!ses->server) + continue; + + if (ses->server->addr.sockAddr.sin_addr.s_addr != target_ip_addr->s_addr || + memcmp(&ses->server->addr.sockAddr6.sin6_addr, + target_ip6_addr, sizeof(*target_ip6_addr))) + continue; + + /* BB lock server and tcp session and increment + use count here?? */ + + /* found a match on the TCP session */ + *psrvTcp = ses->server; + + /* BB check if reconnection needed */ + if (strncmp(ses->userName, userName, MAX_USERNAME_SIZE)) + continue; + + /* Found exact match on both TCP and SMB sessions */ + read_unlock(&GlobalSMBSeslock); + return ses; } read_unlock(&GlobalSMBSeslock); + return NULL; } _ Patches currently in -mm which might be from gorcunov@xxxxxxxxx are origin.patch uml-use-page_size-in-linker-scripts.patch linux-next.patch git-cifs.patch cifs-find_unc-cleanup.patch cifs-cifs_find_tcp_session-cleanup.patch mips-elf-handling-use-selfmag-instead-of-numeric-constant.patch module-loading-elf-handling-use-selfmag-instead-of-numeric-constant.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html