Commit ec50d2c5 authored by David S. Miller's avatar David S. Miller

Merge bk://kernel.bkbits.net/acme/net-2.6

into nuts.davemloft.net:/disk1/BK/netnew-2.6
parents 26e9ff17 fb5f695c
...@@ -129,8 +129,6 @@ struct inet_opt { ...@@ -129,8 +129,6 @@ struct inet_opt {
int mc_index; /* Multicast device index */ int mc_index; /* Multicast device index */
__u32 mc_addr; __u32 mc_addr;
struct ip_mc_socklist *mc_list; /* Group array */ struct ip_mc_socklist *mc_list; /* Group array */
struct page *sndmsg_page; /* Cached page for sendmsg */
u32 sndmsg_off; /* Cached offset for sendmsg */
/* /*
* Following members are used to retain the infomation to build * Following members are used to retain the infomation to build
* an ip header on each ip fragmentation while the socket is corked. * an ip header on each ip fragmentation while the socket is corked.
......
...@@ -664,13 +664,15 @@ static inline int skb_pagelen(const struct sk_buff *skb) ...@@ -664,13 +664,15 @@ static inline int skb_pagelen(const struct sk_buff *skb)
return len + skb_headlen(skb); return len + skb_headlen(skb);
} }
static inline void skb_fill_page_desc(struct sk_buff *skb, int i, struct page *page, int off, int size) static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
struct page *page, int off, int size)
{ {
skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
frag->page = page;
frag->page_offset = off; frag->page = page;
frag->size = size; frag->page_offset = off;
skb_shinfo(skb)->nr_frags = i+1; frag->size = size;
skb_shinfo(skb)->nr_frags = i + 1;
} }
#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags) #define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
......
...@@ -34,8 +34,7 @@ ...@@ -34,8 +34,7 @@
/* This is used to register protocols. */ /* This is used to register protocols. */
struct inet_protocol struct net_protocol {
{
int (*handler)(struct sk_buff *skb); int (*handler)(struct sk_buff *skb);
void (*err_handler)(struct sk_buff *skb, u32 info); void (*err_handler)(struct sk_buff *skb, u32 info);
int no_policy; int no_policy;
...@@ -78,15 +77,15 @@ struct inet_protosw { ...@@ -78,15 +77,15 @@ struct inet_protosw {
#define INET_PROTOSW_REUSE 0x01 /* Are ports automatically reusable? */ #define INET_PROTOSW_REUSE 0x01 /* Are ports automatically reusable? */
#define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */ #define INET_PROTOSW_PERMANENT 0x02 /* Permanent protocols are unremovable. */
extern struct inet_protocol *inet_protocol_base; extern struct net_protocol *inet_protocol_base;
extern struct inet_protocol *inet_protos[MAX_INET_PROTOS]; extern struct net_protocol *inet_protos[MAX_INET_PROTOS];
#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) #if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS]; extern struct inet6_protocol *inet6_protos[MAX_INET_PROTOS];
#endif #endif
extern int inet_add_protocol(struct inet_protocol *prot, unsigned char num); extern int inet_add_protocol(struct net_protocol *prot, unsigned char num);
extern int inet_del_protocol(struct inet_protocol *prot, unsigned char num); extern int inet_del_protocol(struct net_protocol *prot, unsigned char num);
extern void inet_register_protosw(struct inet_protosw *p); extern void inet_register_protosw(struct inet_protosw *p);
extern void inet_unregister_protosw(struct inet_protosw *p); extern void inet_unregister_protosw(struct inet_protosw *p);
......
...@@ -167,6 +167,8 @@ struct sock_common { ...@@ -167,6 +167,8 @@ struct sock_common {
* @sk_socket - Identd and reporting IO signals * @sk_socket - Identd and reporting IO signals
* @sk_user_data - RPC layer private data * @sk_user_data - RPC layer private data
* @sk_owner - module that owns this socket * @sk_owner - module that owns this socket
* @sk_sndmsg_page - cached page for sendmsg
* @sk_sndmsg_off - cached offset for sendmsg
* @sk_send_head - front of stuff to transmit * @sk_send_head - front of stuff to transmit
* @sk_write_pending - a write to stream socket waits to start * @sk_write_pending - a write to stream socket waits to start
* @sk_queue_shrunk - write queue has been shrunk recently * @sk_queue_shrunk - write queue has been shrunk recently
...@@ -249,8 +251,10 @@ struct sock { ...@@ -249,8 +251,10 @@ struct sock {
struct timeval sk_stamp; struct timeval sk_stamp;
struct socket *sk_socket; struct socket *sk_socket;
void *sk_user_data; void *sk_user_data;
struct sk_buff *sk_send_head;
struct module *sk_owner; struct module *sk_owner;
struct page *sk_sndmsg_page;
__u32 sk_sndmsg_off;
struct sk_buff *sk_send_head;
int sk_write_pending; int sk_write_pending;
void *sk_security; void *sk_security;
__u8 sk_queue_shrunk; __u8 sk_queue_shrunk;
......
...@@ -650,6 +650,14 @@ void sk_free(struct sock *sk) ...@@ -650,6 +650,14 @@ void sk_free(struct sock *sk)
printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n", printk(KERN_DEBUG "%s: optmem leakage (%d bytes) detected.\n",
__FUNCTION__, atomic_read(&sk->sk_omem_alloc)); __FUNCTION__, atomic_read(&sk->sk_omem_alloc));
/*
* If sendmsg cached page exists, toss it.
*/
if (sk->sk_sndmsg_page) {
__free_page(sk->sk_sndmsg_page);
sk->sk_sndmsg_page = NULL;
}
security_sk_free(sk); security_sk_free(sk);
kmem_cache_free(sk->sk_slab, sk); kmem_cache_free(sk->sk_slab, sk);
module_put(owner); module_put(owner);
...@@ -1175,6 +1183,9 @@ void sock_init_data(struct socket *sock, struct sock *sk) ...@@ -1175,6 +1183,9 @@ void sock_init_data(struct socket *sock, struct sock *sk)
sk->sk_error_report = sock_def_error_report; sk->sk_error_report = sock_def_error_report;
sk->sk_destruct = sock_def_destruct; sk->sk_destruct = sock_def_destruct;
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
sk->sk_peercred.pid = 0; sk->sk_peercred.pid = 0;
sk->sk_peercred.uid = -1; sk->sk_peercred.uid = -1;
sk->sk_peercred.gid = -1; sk->sk_peercred.gid = -1;
......
...@@ -1041,24 +1041,24 @@ void inet_unregister_protosw(struct inet_protosw *p) ...@@ -1041,24 +1041,24 @@ void inet_unregister_protosw(struct inet_protosw *p)
} }
#ifdef CONFIG_IP_MULTICAST #ifdef CONFIG_IP_MULTICAST
static struct inet_protocol igmp_protocol = { static struct net_protocol igmp_protocol = {
.handler = igmp_rcv, .handler = igmp_rcv,
}; };
#endif #endif
static struct inet_protocol tcp_protocol = { static struct net_protocol tcp_protocol = {
.handler = tcp_v4_rcv, .handler = tcp_v4_rcv,
.err_handler = tcp_v4_err, .err_handler = tcp_v4_err,
.no_policy = 1, .no_policy = 1,
}; };
static struct inet_protocol udp_protocol = { static struct net_protocol udp_protocol = {
.handler = udp_rcv, .handler = udp_rcv,
.err_handler = udp_err, .err_handler = udp_err,
.no_policy = 1, .no_policy = 1,
}; };
static struct inet_protocol icmp_protocol = { static struct net_protocol icmp_protocol = {
.handler = icmp_rcv, .handler = icmp_rcv,
}; };
......
...@@ -343,7 +343,7 @@ static struct xfrm_type ah_type = ...@@ -343,7 +343,7 @@ static struct xfrm_type ah_type =
.output = ah_output .output = ah_output
}; };
static struct inet_protocol ah4_protocol = { static struct net_protocol ah4_protocol = {
.handler = xfrm4_rcv, .handler = xfrm4_rcv,
.err_handler = ah4_err, .err_handler = ah4_err,
.no_policy = 1, .no_policy = 1,
......
...@@ -595,7 +595,7 @@ static struct xfrm_type esp_type = ...@@ -595,7 +595,7 @@ static struct xfrm_type esp_type =
.output = esp_output .output = esp_output
}; };
static struct inet_protocol esp4_protocol = { static struct net_protocol esp4_protocol = {
.handler = xfrm4_rcv, .handler = xfrm4_rcv,
.err_handler = esp4_err, .err_handler = esp4_err,
.no_policy = 1, .no_policy = 1,
......
...@@ -592,7 +592,7 @@ static void icmp_unreach(struct sk_buff *skb) ...@@ -592,7 +592,7 @@ static void icmp_unreach(struct sk_buff *skb)
struct iphdr *iph; struct iphdr *iph;
struct icmphdr *icmph; struct icmphdr *icmph;
int hash, protocol; int hash, protocol;
struct inet_protocol *ipprot; struct net_protocol *ipprot;
struct sock *raw_sk; struct sock *raw_sk;
u32 info = 0; u32 info = 0;
......
...@@ -1240,7 +1240,7 @@ int __init ipgre_fb_tunnel_init(struct net_device *dev) ...@@ -1240,7 +1240,7 @@ int __init ipgre_fb_tunnel_init(struct net_device *dev)
} }
static struct inet_protocol ipgre_protocol = { static struct net_protocol ipgre_protocol = {
.handler = ipgre_rcv, .handler = ipgre_rcv,
.err_handler = ipgre_err, .err_handler = ipgre_err,
}; };
......
...@@ -223,7 +223,7 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb) ...@@ -223,7 +223,7 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb)
int protocol = skb->nh.iph->protocol; int protocol = skb->nh.iph->protocol;
int hash; int hash;
struct sock *raw_sk; struct sock *raw_sk;
struct inet_protocol *ipprot; struct net_protocol *ipprot;
resubmit: resubmit:
hash = protocol & (MAX_INET_PROTOS - 1); hash = protocol & (MAX_INET_PROTOS - 1);
......
...@@ -766,8 +766,8 @@ int ip_append_data(struct sock *sk, ...@@ -766,8 +766,8 @@ int ip_append_data(struct sock *sk,
inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst); inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
inet->cork.rt = rt; inet->cork.rt = rt;
inet->cork.length = 0; inet->cork.length = 0;
inet->sndmsg_page = NULL; sk->sk_sndmsg_page = NULL;
inet->sndmsg_off = 0; sk->sk_sndmsg_off = 0;
if ((exthdrlen = rt->u.dst.header_len) != 0) { if ((exthdrlen = rt->u.dst.header_len) != 0) {
length += exthdrlen; length += exthdrlen;
transhdrlen += exthdrlen; transhdrlen += exthdrlen;
...@@ -915,8 +915,8 @@ int ip_append_data(struct sock *sk, ...@@ -915,8 +915,8 @@ int ip_append_data(struct sock *sk,
} else { } else {
int i = skb_shinfo(skb)->nr_frags; int i = skb_shinfo(skb)->nr_frags;
skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1]; skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1];
struct page *page = inet->sndmsg_page; struct page *page = sk->sk_sndmsg_page;
int off = inet->sndmsg_off; int off = sk->sk_sndmsg_off;
unsigned int left; unsigned int left;
if (page && (left = PAGE_SIZE - off) > 0) { if (page && (left = PAGE_SIZE - off) > 0) {
...@@ -928,7 +928,7 @@ int ip_append_data(struct sock *sk, ...@@ -928,7 +928,7 @@ int ip_append_data(struct sock *sk,
goto error; goto error;
} }
get_page(page); get_page(page);
skb_fill_page_desc(skb, i, page, inet->sndmsg_off, 0); skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
frag = &skb_shinfo(skb)->frags[i]; frag = &skb_shinfo(skb)->frags[i];
} }
} else if (i < MAX_SKB_FRAGS) { } else if (i < MAX_SKB_FRAGS) {
...@@ -939,8 +939,8 @@ int ip_append_data(struct sock *sk, ...@@ -939,8 +939,8 @@ int ip_append_data(struct sock *sk,
err = -ENOMEM; err = -ENOMEM;
goto error; goto error;
} }
inet->sndmsg_page = page; sk->sk_sndmsg_page = page;
inet->sndmsg_off = 0; sk->sk_sndmsg_off = 0;
skb_fill_page_desc(skb, i, page, 0, 0); skb_fill_page_desc(skb, i, page, 0, 0);
frag = &skb_shinfo(skb)->frags[i]; frag = &skb_shinfo(skb)->frags[i];
...@@ -954,7 +954,7 @@ int ip_append_data(struct sock *sk, ...@@ -954,7 +954,7 @@ int ip_append_data(struct sock *sk,
err = -EFAULT; err = -EFAULT;
goto error; goto error;
} }
inet->sndmsg_off += copy; sk->sk_sndmsg_off += copy;
frag->size += copy; frag->size += copy;
skb->len += copy; skb->len += copy;
skb->data_len += copy; skb->data_len += copy;
......
...@@ -409,7 +409,7 @@ static struct xfrm_type ipcomp_type = { ...@@ -409,7 +409,7 @@ static struct xfrm_type ipcomp_type = {
.output = ipcomp_output .output = ipcomp_output
}; };
static struct inet_protocol ipcomp4_protocol = { static struct net_protocol ipcomp4_protocol = {
.handler = xfrm4_rcv, .handler = xfrm4_rcv,
.err_handler = ipcomp4_err, .err_handler = ipcomp4_err,
.no_policy = 1, .no_policy = 1,
......
...@@ -109,7 +109,7 @@ static int ip_mr_forward(struct sk_buff *skb, struct mfc_cache *cache, int local ...@@ -109,7 +109,7 @@ static int ip_mr_forward(struct sk_buff *skb, struct mfc_cache *cache, int local
static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert); static int ipmr_cache_report(struct sk_buff *pkt, vifi_t vifi, int assert);
static int ipmr_fill_mroute(struct sk_buff *skb, struct mfc_cache *c, struct rtmsg *rtm); static int ipmr_fill_mroute(struct sk_buff *skb, struct mfc_cache *c, struct rtmsg *rtm);
static struct inet_protocol pim_protocol; static struct net_protocol pim_protocol;
static struct timer_list ipmr_expire_timer; static struct timer_list ipmr_expire_timer;
...@@ -1876,7 +1876,7 @@ static struct file_operations ipmr_mfc_fops = { ...@@ -1876,7 +1876,7 @@ static struct file_operations ipmr_mfc_fops = {
#endif #endif
#ifdef CONFIG_IP_PIMSM_V2 #ifdef CONFIG_IP_PIMSM_V2
static struct inet_protocol pim_protocol = { static struct net_protocol pim_protocol = {
.handler = pim_rcv, .handler = pim_rcv,
}; };
#endif #endif
......
...@@ -48,14 +48,14 @@ ...@@ -48,14 +48,14 @@
#include <net/ipip.h> #include <net/ipip.h>
#include <linux/igmp.h> #include <linux/igmp.h>
struct inet_protocol *inet_protos[MAX_INET_PROTOS]; struct net_protocol *inet_protos[MAX_INET_PROTOS];
static spinlock_t inet_proto_lock = SPIN_LOCK_UNLOCKED; static spinlock_t inet_proto_lock = SPIN_LOCK_UNLOCKED;
/* /*
* Add a protocol handler to the hash tables * Add a protocol handler to the hash tables
*/ */
int inet_add_protocol(struct inet_protocol *prot, unsigned char protocol) int inet_add_protocol(struct net_protocol *prot, unsigned char protocol)
{ {
int hash, ret; int hash, ret;
...@@ -77,7 +77,7 @@ int inet_add_protocol(struct inet_protocol *prot, unsigned char protocol) ...@@ -77,7 +77,7 @@ int inet_add_protocol(struct inet_protocol *prot, unsigned char protocol)
* Remove a protocol from the hash tables. * Remove a protocol from the hash tables.
*/ */
int inet_del_protocol(struct inet_protocol *prot, unsigned char protocol) int inet_del_protocol(struct net_protocol *prot, unsigned char protocol)
{ {
int hash, ret; int hash, ret;
......
...@@ -628,16 +628,6 @@ static void tcp_listen_stop (struct sock *sk) ...@@ -628,16 +628,6 @@ static void tcp_listen_stop (struct sock *sk)
BUG_TRAP(!sk->sk_ack_backlog); BUG_TRAP(!sk->sk_ack_backlog);
} }
static inline void fill_page_desc(struct sk_buff *skb, int i,
struct page *page, int off, int size)
{
skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
frag->page = page;
frag->page_offset = off;
frag->size = size;
skb_shinfo(skb)->nr_frags = i + 1;
}
static inline void tcp_mark_push(struct tcp_opt *tp, struct sk_buff *skb) static inline void tcp_mark_push(struct tcp_opt *tp, struct sk_buff *skb)
{ {
TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH;
...@@ -740,7 +730,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse ...@@ -740,7 +730,7 @@ static ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffse
skb_shinfo(skb)->frags[i - 1].size += copy; skb_shinfo(skb)->frags[i - 1].size += copy;
} else if (i < MAX_SKB_FRAGS) { } else if (i < MAX_SKB_FRAGS) {
get_page(page); get_page(page);
fill_page_desc(skb, i, page, offset, copy); skb_fill_page_desc(skb, i, page, offset, copy);
} else { } else {
tcp_mark_push(tp, skb); tcp_mark_push(tp, skb);
goto new_segment; goto new_segment;
...@@ -816,8 +806,8 @@ ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset, ...@@ -816,8 +806,8 @@ ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset,
return res; return res;
} }
#define TCP_PAGE(sk) (inet_sk(sk)->sndmsg_page) #define TCP_PAGE(sk) (sk->sk_sndmsg_page)
#define TCP_OFF(sk) (inet_sk(sk)->sndmsg_off) #define TCP_OFF(sk) (sk->sk_sndmsg_off)
static inline int select_size(struct sock *sk, struct tcp_opt *tp) static inline int select_size(struct sock *sk, struct tcp_opt *tp)
{ {
...@@ -980,7 +970,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, ...@@ -980,7 +970,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
skb_shinfo(skb)->frags[i - 1].size += skb_shinfo(skb)->frags[i - 1].size +=
copy; copy;
} else { } else {
fill_page_desc(skb, i, page, off, copy); skb_fill_page_desc(skb, i, page, off, copy);
if (TCP_PAGE(sk)) { if (TCP_PAGE(sk)) {
get_page(page); get_page(page);
} else if (off + copy < PAGE_SIZE) { } else if (off + copy < PAGE_SIZE) {
......
...@@ -2113,10 +2113,6 @@ static int tcp_v4_destroy_sock(struct sock *sk) ...@@ -2113,10 +2113,6 @@ static int tcp_v4_destroy_sock(struct sock *sk)
if (tp->bind_hash) if (tp->bind_hash)
tcp_put_port(sk); tcp_put_port(sk);
/* If sendmsg cached page exists, toss it. */
if (inet_sk(sk)->sndmsg_page)
__free_page(inet_sk(sk)->sndmsg_page);
atomic_dec(&tcp_sockets_allocated); atomic_dec(&tcp_sockets_allocated);
return 0; return 0;
......
...@@ -167,7 +167,7 @@ static struct xfrm_type ipip_type = { ...@@ -167,7 +167,7 @@ static struct xfrm_type ipip_type = {
.output = ipip_output .output = ipip_output
}; };
static struct inet_protocol ipip_protocol = { static struct net_protocol ipip_protocol = {
.handler = ipip_rcv, .handler = ipip_rcv,
.err_handler = ipip_err, .err_handler = ipip_err,
.no_policy = 1, .no_policy = 1,
......
...@@ -852,8 +852,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse ...@@ -852,8 +852,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
np->cork.hop_limit = hlimit; np->cork.hop_limit = hlimit;
inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst); inet->cork.fragsize = mtu = dst_pmtu(&rt->u.dst);
inet->cork.length = 0; inet->cork.length = 0;
inet->sndmsg_page = NULL; sk->sk_sndmsg_page = NULL;
inet->sndmsg_off = 0; sk->sk_sndmsg_off = 0;
exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0); exthdrlen = rt->u.dst.header_len + (opt ? opt->opt_flen : 0);
length += exthdrlen; length += exthdrlen;
transhdrlen += exthdrlen; transhdrlen += exthdrlen;
...@@ -969,8 +969,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse ...@@ -969,8 +969,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
} else { } else {
int i = skb_shinfo(skb)->nr_frags; int i = skb_shinfo(skb)->nr_frags;
skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1]; skb_frag_t *frag = &skb_shinfo(skb)->frags[i-1];
struct page *page = inet->sndmsg_page; struct page *page = sk->sk_sndmsg_page;
int off = inet->sndmsg_off; int off = sk->sk_sndmsg_off;
unsigned int left; unsigned int left;
if (page && (left = PAGE_SIZE - off) > 0) { if (page && (left = PAGE_SIZE - off) > 0) {
...@@ -982,7 +982,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse ...@@ -982,7 +982,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
goto error; goto error;
} }
get_page(page); get_page(page);
skb_fill_page_desc(skb, i, page, inet->sndmsg_off, 0); skb_fill_page_desc(skb, i, page, sk->sk_sndmsg_off, 0);
frag = &skb_shinfo(skb)->frags[i]; frag = &skb_shinfo(skb)->frags[i];
} }
} else if(i < MAX_SKB_FRAGS) { } else if(i < MAX_SKB_FRAGS) {
...@@ -993,8 +993,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse ...@@ -993,8 +993,8 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
err = -ENOMEM; err = -ENOMEM;
goto error; goto error;
} }
inet->sndmsg_page = page; sk->sk_sndmsg_page = page;
inet->sndmsg_off = 0; sk->sk_sndmsg_off = 0;
skb_fill_page_desc(skb, i, page, 0, 0); skb_fill_page_desc(skb, i, page, 0, 0);
frag = &skb_shinfo(skb)->frags[i]; frag = &skb_shinfo(skb)->frags[i];
...@@ -1008,7 +1008,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse ...@@ -1008,7 +1008,7 @@ int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to, int offse
err = -EFAULT; err = -EFAULT;
goto error; goto error;
} }
inet->sndmsg_off += copy; sk->sk_sndmsg_off += copy;
frag->size += copy; frag->size += copy;
skb->len += copy; skb->len += copy;
skb->data_len += copy; skb->data_len += copy;
......
...@@ -800,7 +800,7 @@ int __init ipip6_fb_tunnel_init(struct net_device *dev) ...@@ -800,7 +800,7 @@ int __init ipip6_fb_tunnel_init(struct net_device *dev)
return 0; return 0;
} }
static struct inet_protocol sit_protocol = { static struct net_protocol sit_protocol = {
.handler = ipip6_rcv, .handler = ipip6_rcv,
.err_handler = ipip6_err, .err_handler = ipip6_err,
}; };
......
...@@ -1893,7 +1893,6 @@ static int tcp_v6_init_sock(struct sock *sk) ...@@ -1893,7 +1893,6 @@ static int tcp_v6_init_sock(struct sock *sk)
static int tcp_v6_destroy_sock(struct sock *sk) static int tcp_v6_destroy_sock(struct sock *sk)
{ {
struct tcp_opt *tp = tcp_sk(sk); struct tcp_opt *tp = tcp_sk(sk);
struct inet_opt *inet = inet_sk(sk);
tcp_clear_xmit_timers(sk); tcp_clear_xmit_timers(sk);
...@@ -1910,10 +1909,6 @@ static int tcp_v6_destroy_sock(struct sock *sk) ...@@ -1910,10 +1909,6 @@ static int tcp_v6_destroy_sock(struct sock *sk)
if (tcp_sk(sk)->bind_hash) if (tcp_sk(sk)->bind_hash)
tcp_put_port(sk); tcp_put_port(sk);
/* If sendmsg cached page exists, toss it. */
if (inet->sndmsg_page != NULL)
__free_page(inet->sndmsg_page);
atomic_dec(&tcp_sockets_allocated); atomic_dec(&tcp_sockets_allocated);
return inet6_destroy_sock(sk); return inet6_destroy_sock(sk);
......
...@@ -875,7 +875,7 @@ static struct inet_protosw sctp_stream_protosw = { ...@@ -875,7 +875,7 @@ static struct inet_protosw sctp_stream_protosw = {
}; };
/* Register with IP layer. */ /* Register with IP layer. */
static struct inet_protocol sctp_protocol = { static struct net_protocol sctp_protocol = {
.handler = sctp_rcv, .handler = sctp_rcv,
.err_handler = sctp_v4_err, .err_handler = sctp_v4_err,
.no_policy = 1, .no_policy = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment