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 30
30
#include <linux/splice.h>
31
31
32
32
#include <net/sock.h>
33
+ #include <net/inet_common.h>
34
+ #if IS_ENABLED (CONFIG_IPV6 )
35
+ #include <net/ipv6.h>
36
+ #endif
33
37
#include <net/tcp.h>
34
38
#include <net/smc.h>
35
39
#include <asm/ioctls.h>
@@ -360,6 +364,16 @@ static void smc_destruct(struct sock *sk)
360
364
return ;
361
365
if (!sock_flag (sk , SOCK_DEAD ))
362
366
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
+ }
363
377
}
364
378
365
379
static struct lock_class_key smc_key ;
Original file line number Diff line number Diff line change @@ -283,10 +283,10 @@ struct smc_connection {
283
283
};
284
284
285
285
struct 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
+ };
290
290
struct socket * clcsock ; /* internal tcp socket */
291
291
void (* clcsk_state_change )(struct sock * sk );
292
292
/* original stat_change fct. */
You can’t perform that action at this time.
0 commit comments