Skip to content

Commit 24da799

Browse files
edumazetdavem330
authored andcommitted
inet: remove inet_sk_copy_descendant()
This is no longer used, SCTP now uses a private helper. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ea416e2 commit 24da799

2 files changed

Lines changed: 0 additions & 18 deletions

File tree

‎include/linux/ipv6.h‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,17 +345,6 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk)
345345
return (struct raw6_sock *)sk;
346346
}
347347

348-
static inline void inet_sk_copy_descendant(struct sock *sk_to,
349-
const struct sock *sk_from)
350-
{
351-
int ancestor_size = sizeof(struct inet_sock);
352-
353-
if (sk_from->sk_family == PF_INET6)
354-
ancestor_size += sizeof(struct ipv6_pinfo);
355-
356-
__inet_sk_copy_descendant(sk_to, sk_from, ancestor_size);
357-
}
358-
359348
#define __ipv6_only_sock(sk) (sk->sk_ipv6only)
360349
#define ipv6_only_sock(sk) (__ipv6_only_sock(sk))
361350
#define ipv6_sk_rxinfo(sk) ((sk)->sk_family == PF_INET6 && \

‎include/net/inet_sock.h‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,6 @@ static inline void __inet_sk_copy_descendant(struct sock *sk_to,
296296
memcpy(inet_sk(sk_to) + 1, inet_sk(sk_from) + 1,
297297
sk_from->sk_prot->obj_size - ancestor_size);
298298
}
299-
#if !(IS_ENABLED(CONFIG_IPV6))
300-
static inline void inet_sk_copy_descendant(struct sock *sk_to,
301-
const struct sock *sk_from)
302-
{
303-
__inet_sk_copy_descendant(sk_to, sk_from, sizeof(struct inet_sock));
304-
}
305-
#endif
306299

307300
int inet_sk_rebuild_header(struct sock *sk);
308301

0 commit comments

Comments
 (0)