Skip to content

Commit 9fab906

Browse files
committed
cifs: Remove unused is_server_using_iface()
JIRA: https://issues.redhat.com/browse/RHEL-76046 commit f17224c Author: Dr. David Alan Gilbert <linux@treblig.org> Date: Fri Dec 20 21:59:37 2024 +0000 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> Signed-off-by: Paulo Alcantara <paalcant@redhat.com>
1 parent 981ef23 commit 9fab906

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
@@ -626,8 +626,6 @@ void rqst_page_get_length(const struct smb_rqst *rqst, unsigned int page,
626626
unsigned int *len, unsigned int *offset);
627627

628628
int cifs_try_adding_channels(struct cifs_ses *ses);
629-
bool is_server_using_iface(struct TCP_Server_Info *server,
630-
struct cifs_server_iface *iface);
631629
bool is_ses_using_iface(struct cifs_ses *ses, struct cifs_server_iface *iface);
632630
void cifs_ses_mark_for_reconnect(struct cifs_ses *ses);
633631

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)