File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 3030#include <linux/splice.h>
3131
3232#include <net/sock.h>
33+ #include <net/inet_common.h>
34+ #if IS_ENABLED (CONFIG_IPV6 )
35+ #include <net/ipv6.h>
36+ #endif
3337#include <net/tcp.h>
3438#include <net/smc.h>
3539#include <asm/ioctls.h>
@@ -360,6 +364,16 @@ static void smc_destruct(struct sock *sk)
360364 return ;
361365 if (!sock_flag (sk , SOCK_DEAD ))
362366 return ;
367+ switch (sk -> sk_family ) {
368+ case AF_INET :
369+ inet_sock_destruct (sk );
370+ break ;
371+ #if IS_ENABLED (CONFIG_IPV6 )
372+ case AF_INET6 :
373+ inet6_sock_destruct (sk );
374+ break ;
375+ #endif
376+ }
363377}
364378
365379static struct lock_class_key smc_key ;
Original file line number Diff line number Diff line change @@ -283,10 +283,10 @@ struct smc_connection {
283283};
284284
285285struct smc_sock { /* smc sock container */
286- struct sock sk ;
287- #if IS_ENABLED ( CONFIG_IPV6 )
288- struct ipv6_pinfo * pinet6 ;
289- #endif
286+ union {
287+ struct sock sk ;
288+ struct inet_sock icsk_inet ;
289+ };
290290 struct socket * clcsock ; /* internal tcp socket */
291291 void (* clcsk_state_change )(struct sock * sk );
292292 /* original stat_change fct. */
You can’t perform that action at this time.
0 commit comments