Skip to content

Commit f17224c

Browse files
Dr. David Alan GilbertSteve French
authored andcommitted
cifs: Remove unused is_server_using_iface()
The last use of is_server_using_iface() was removed in 2022 by commit aa45dad ("cifs: change iface_list from array to sorted linked list") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent b8ea3b1 commit f17224c

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

fs/smb/client/cifsproto.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,6 @@ int cifs_alloc_hash(const char *name, struct shash_desc **sdesc);
614614
void cifs_free_hash(struct shash_desc **sdesc);
615615

616616
int cifs_try_adding_channels(struct cifs_ses *ses);
617-
bool is_server_using_iface(struct TCP_Server_Info *server,
618-
struct cifs_server_iface *iface);
619617
bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface);
620618
void cifs_ses_mark_for_reconnect(struct cifs_ses *ses);
621619

fs/smb/client/sess.c

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,6 @@ static int
2727
cifs_ses_add_channel(struct cifs_ses *ses,
2828
struct cifs_server_iface *iface);
2929

30-
bool
31-
is_server_using_iface(struct TCP_Server_Info *server,
32-
struct cifs_server_iface *iface)
33-
{
34-
struct sockaddr_in *i4 = (struct sockaddr_in *)&iface->sockaddr;
35-
struct sockaddr_in6 *i6 = (struct sockaddr_in6 *)&iface->sockaddr;
36-
struct sockaddr_in *s4 = (struct sockaddr_in *)&server->dstaddr;
37-
struct sockaddr_in6 *s6 = (struct sockaddr_in6 *)&server->dstaddr;
38-
39-
if (server->dstaddr.ss_family != iface->sockaddr.ss_family)
40-
return false;
41-
if (server->dstaddr.ss_family == AF_INET) {
42-
if (s4->sin_addr.s_addr != i4->sin_addr.s_addr)
43-
return false;
44-
} else if (server->dstaddr.ss_family == AF_INET6) {
45-
if (memcmp(&s6->sin6_addr, &i6->sin6_addr,
46-
sizeof(i6->sin6_addr)) != 0)
47-
return false;
48-
} else {
49-
/* unknown family.. */
50-
return false;
51-
}
52-
return true;
53-
}
54-
5530
bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface)
5631
{
5732
int i;

0 commit comments

Comments
 (0)