]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp.c
[NET]: DIV_ROUND_UP cleanup (part two)
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp.c
index da4c0b6ab79ab5f25b5e9accddf592796c93c4ba..18c64c74f6d50520f5928355a38e54d6272269d4 100644 (file)
  *     TCP_CLOSE               socket is finished
  */
 
+#include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/fcntl.h>
@@ -658,9 +659,10 @@ static inline int select_size(struct sock *sk)
        return tmp;
 }
 
-int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
                size_t size)
 {
+       struct sock *sk = sock->sk;
        struct iovec *iov;
        struct tcp_sock *tp = tcp_sk(sk);
        struct sk_buff *skb;
@@ -2013,7 +2015,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
 
        if (tp->rx_opt.tstamp_ok)
                info->tcpi_options |= TCPI_OPT_TIMESTAMPS;
-       if (tp->rx_opt.sack_ok)
+       if (tcp_is_sack(tp))
                info->tcpi_options |= TCPI_OPT_SACK;
        if (tp->rx_opt.wscale_ok) {
                info->tcpi_options |= TCPI_OPT_WSCALE;
@@ -2209,7 +2211,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
                        goto out;
 
                mss = skb_shinfo(skb)->gso_size;
-               skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
+               skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss);
 
                segs = NULL;
                goto out;