diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2009-05-27 07:30:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-27 18:47:07 -0400 |
commit | 2a91525c20d3aae15b33c189514b9e20e30ef8a8 (patch) | |
tree | adf915fe9dc7dc28cdb2ef93c5494c694e2577da /net/core/sock.c | |
parent | 553e2335625e6c96cb6d76c0d63cfc1034747614 (diff) |
net: net/core/sock.c cleanup
Pure style cleanup patch.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 103 |
1 files changed, 44 insertions, 59 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 7dbf3ffb35cc..58dec9dff99a 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -212,6 +212,7 @@ __u32 sysctl_rmem_default __read_mostly = SK_RMEM_MAX; | |||
212 | 212 | ||
213 | /* Maximal space eaten by iovec or ancilliary data plus some space */ | 213 | /* Maximal space eaten by iovec or ancilliary data plus some space */ |
214 | int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512); | 214 | int sysctl_optmem_max __read_mostly = sizeof(unsigned long)*(2*UIO_MAXIOV+512); |
215 | EXPORT_SYMBOL(sysctl_optmem_max); | ||
215 | 216 | ||
216 | static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) | 217 | static int sock_set_timeout(long *timeo_p, char __user *optval, int optlen) |
217 | { | 218 | { |
@@ -444,7 +445,7 @@ static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool) | |||
444 | int sock_setsockopt(struct socket *sock, int level, int optname, | 445 | int sock_setsockopt(struct socket *sock, int level, int optname, |
445 | char __user *optval, int optlen) | 446 | char __user *optval, int optlen) |
446 | { | 447 | { |
447 | struct sock *sk=sock->sk; | 448 | struct sock *sk = sock->sk; |
448 | int val; | 449 | int val; |
449 | int valbool; | 450 | int valbool; |
450 | struct linger ling; | 451 | struct linger ling; |
@@ -463,15 +464,15 @@ int sock_setsockopt(struct socket *sock, int level, int optname, | |||
463 | if (get_user(val, (int __user *)optval)) | 464 | if (get_user(val, (int __user *)optval)) |
464 | return -EFAULT; | 465 | return -EFAULT; |
465 | 466 | ||
466 | valbool = val?1:0; | 467 | valbool = val ? 1 : 0; |
467 | 468 | ||
468 | lock_sock(sk); | 469 | lock_sock(sk); |
469 | 470 | ||
470 | switch(optname) { | 471 | switch (optname) { |
471 | case SO_DEBUG: | 472 | case SO_DEBUG: |
472 | if (val && !capable(CAP_NET_ADMIN)) { | 473 | if (val && !capable(CAP_NET_ADMIN)) |
473 | ret = -EACCES; | 474 | ret = -EACCES; |
474 | } else | 475 | else |
475 | sock_valbool_flag(sk, SOCK_DBG, valbool); | 476 | sock_valbool_flag(sk, SOCK_DBG, valbool); |
476 | break; | 477 | break; |
477 | case SO_REUSEADDR: | 478 | case SO_REUSEADDR: |
@@ -582,7 +583,7 @@ set_rcvbuf: | |||
582 | ret = -EINVAL; /* 1003.1g */ | 583 | ret = -EINVAL; /* 1003.1g */ |
583 | break; | 584 | break; |
584 | } | 585 | } |
585 | if (copy_from_user(&ling,optval,sizeof(ling))) { | 586 | if (copy_from_user(&ling, optval, sizeof(ling))) { |
586 | ret = -EFAULT; | 587 | ret = -EFAULT; |
587 | break; | 588 | break; |
588 | } | 589 | } |
@@ -690,9 +691,8 @@ set_rcvbuf: | |||
690 | case SO_MARK: | 691 | case SO_MARK: |
691 | if (!capable(CAP_NET_ADMIN)) | 692 | if (!capable(CAP_NET_ADMIN)) |
692 | ret = -EPERM; | 693 | ret = -EPERM; |
693 | else { | 694 | else |
694 | sk->sk_mark = val; | 695 | sk->sk_mark = val; |
695 | } | ||
696 | break; | 696 | break; |
697 | 697 | ||
698 | /* We implement the SO_SNDLOWAT etc to | 698 | /* We implement the SO_SNDLOWAT etc to |
@@ -704,6 +704,7 @@ set_rcvbuf: | |||
704 | release_sock(sk); | 704 | release_sock(sk); |
705 | return ret; | 705 | return ret; |
706 | } | 706 | } |
707 | EXPORT_SYMBOL(sock_setsockopt); | ||
707 | 708 | ||
708 | 709 | ||
709 | int sock_getsockopt(struct socket *sock, int level, int optname, | 710 | int sock_getsockopt(struct socket *sock, int level, int optname, |
@@ -727,7 +728,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
727 | 728 | ||
728 | memset(&v, 0, sizeof(v)); | 729 | memset(&v, 0, sizeof(v)); |
729 | 730 | ||
730 | switch(optname) { | 731 | switch (optname) { |
731 | case SO_DEBUG: | 732 | case SO_DEBUG: |
732 | v.val = sock_flag(sk, SOCK_DBG); | 733 | v.val = sock_flag(sk, SOCK_DBG); |
733 | break; | 734 | break; |
@@ -762,7 +763,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
762 | 763 | ||
763 | case SO_ERROR: | 764 | case SO_ERROR: |
764 | v.val = -sock_error(sk); | 765 | v.val = -sock_error(sk); |
765 | if (v.val==0) | 766 | if (v.val == 0) |
766 | v.val = xchg(&sk->sk_err_soft, 0); | 767 | v.val = xchg(&sk->sk_err_soft, 0); |
767 | break; | 768 | break; |
768 | 769 | ||
@@ -816,7 +817,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
816 | break; | 817 | break; |
817 | 818 | ||
818 | case SO_RCVTIMEO: | 819 | case SO_RCVTIMEO: |
819 | lv=sizeof(struct timeval); | 820 | lv = sizeof(struct timeval); |
820 | if (sk->sk_rcvtimeo == MAX_SCHEDULE_TIMEOUT) { | 821 | if (sk->sk_rcvtimeo == MAX_SCHEDULE_TIMEOUT) { |
821 | v.tm.tv_sec = 0; | 822 | v.tm.tv_sec = 0; |
822 | v.tm.tv_usec = 0; | 823 | v.tm.tv_usec = 0; |
@@ -827,7 +828,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
827 | break; | 828 | break; |
828 | 829 | ||
829 | case SO_SNDTIMEO: | 830 | case SO_SNDTIMEO: |
830 | lv=sizeof(struct timeval); | 831 | lv = sizeof(struct timeval); |
831 | if (sk->sk_sndtimeo == MAX_SCHEDULE_TIMEOUT) { | 832 | if (sk->sk_sndtimeo == MAX_SCHEDULE_TIMEOUT) { |
832 | v.tm.tv_sec = 0; | 833 | v.tm.tv_sec = 0; |
833 | v.tm.tv_usec = 0; | 834 | v.tm.tv_usec = 0; |
@@ -842,7 +843,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, | |||
842 | break; | 843 | break; |
843 | 844 | ||
844 | case SO_SNDLOWAT: | 845 | case SO_SNDLOWAT: |
845 | v.val=1; | 846 | v.val = 1; |
846 | break; | 847 | break; |
847 | 848 | ||
848 | case SO_PASSCRED: | 849 | case SO_PASSCRED: |
@@ -1002,6 +1003,7 @@ struct sock *sk_alloc(struct net *net, int family, gfp_t priority, | |||
1002 | 1003 | ||
1003 | return sk; | 1004 | return sk; |
1004 | } | 1005 | } |
1006 | EXPORT_SYMBOL(sk_alloc); | ||
1005 | 1007 | ||
1006 | void sk_free(struct sock *sk) | 1008 | void sk_free(struct sock *sk) |
1007 | { | 1009 | { |
@@ -1026,6 +1028,7 @@ void sk_free(struct sock *sk) | |||
1026 | put_net(sock_net(sk)); | 1028 | put_net(sock_net(sk)); |
1027 | sk_prot_free(sk->sk_prot_creator, sk); | 1029 | sk_prot_free(sk->sk_prot_creator, sk); |
1028 | } | 1030 | } |
1031 | EXPORT_SYMBOL(sk_free); | ||
1029 | 1032 | ||
1030 | /* | 1033 | /* |
1031 | * Last sock_put should drop referrence to sk->sk_net. It has already | 1034 | * Last sock_put should drop referrence to sk->sk_net. It has already |
@@ -1126,7 +1129,6 @@ struct sock *sk_clone(const struct sock *sk, const gfp_t priority) | |||
1126 | out: | 1129 | out: |
1127 | return newsk; | 1130 | return newsk; |
1128 | } | 1131 | } |
1129 | |||
1130 | EXPORT_SYMBOL_GPL(sk_clone); | 1132 | EXPORT_SYMBOL_GPL(sk_clone); |
1131 | 1133 | ||
1132 | void sk_setup_caps(struct sock *sk, struct dst_entry *dst) | 1134 | void sk_setup_caps(struct sock *sk, struct dst_entry *dst) |
@@ -1177,6 +1179,7 @@ void sock_wfree(struct sk_buff *skb) | |||
1177 | sk->sk_write_space(sk); | 1179 | sk->sk_write_space(sk); |
1178 | sock_put(sk); | 1180 | sock_put(sk); |
1179 | } | 1181 | } |
1182 | EXPORT_SYMBOL(sock_wfree); | ||
1180 | 1183 | ||
1181 | /* | 1184 | /* |
1182 | * Read buffer destructor automatically called from kfree_skb. | 1185 | * Read buffer destructor automatically called from kfree_skb. |
@@ -1188,6 +1191,7 @@ void sock_rfree(struct sk_buff *skb) | |||
1188 | atomic_sub(skb->truesize, &sk->sk_rmem_alloc); | 1191 | atomic_sub(skb->truesize, &sk->sk_rmem_alloc); |
1189 | sk_mem_uncharge(skb->sk, skb->truesize); | 1192 | sk_mem_uncharge(skb->sk, skb->truesize); |
1190 | } | 1193 | } |
1194 | EXPORT_SYMBOL(sock_rfree); | ||
1191 | 1195 | ||
1192 | 1196 | ||
1193 | int sock_i_uid(struct sock *sk) | 1197 | int sock_i_uid(struct sock *sk) |
@@ -1199,6 +1203,7 @@ int sock_i_uid(struct sock *sk) | |||
1199 | read_unlock(&sk->sk_callback_lock); | 1203 | read_unlock(&sk->sk_callback_lock); |
1200 | return uid; | 1204 | return uid; |
1201 | } | 1205 | } |
1206 | EXPORT_SYMBOL(sock_i_uid); | ||
1202 | 1207 | ||
1203 | unsigned long sock_i_ino(struct sock *sk) | 1208 | unsigned long sock_i_ino(struct sock *sk) |
1204 | { | 1209 | { |
@@ -1209,6 +1214,7 @@ unsigned long sock_i_ino(struct sock *sk) | |||
1209 | read_unlock(&sk->sk_callback_lock); | 1214 | read_unlock(&sk->sk_callback_lock); |
1210 | return ino; | 1215 | return ino; |
1211 | } | 1216 | } |
1217 | EXPORT_SYMBOL(sock_i_ino); | ||
1212 | 1218 | ||
1213 | /* | 1219 | /* |
1214 | * Allocate a skb from the socket's send buffer. | 1220 | * Allocate a skb from the socket's send buffer. |
@@ -1217,7 +1223,7 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, | |||
1217 | gfp_t priority) | 1223 | gfp_t priority) |
1218 | { | 1224 | { |
1219 | if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { | 1225 | if (force || atomic_read(&sk->sk_wmem_alloc) < sk->sk_sndbuf) { |
1220 | struct sk_buff * skb = alloc_skb(size, priority); | 1226 | struct sk_buff *skb = alloc_skb(size, priority); |
1221 | if (skb) { | 1227 | if (skb) { |
1222 | skb_set_owner_w(skb, sk); | 1228 | skb_set_owner_w(skb, sk); |
1223 | return skb; | 1229 | return skb; |
@@ -1225,6 +1231,7 @@ struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force, | |||
1225 | } | 1231 | } |
1226 | return NULL; | 1232 | return NULL; |
1227 | } | 1233 | } |
1234 | EXPORT_SYMBOL(sock_wmalloc); | ||
1228 | 1235 | ||
1229 | /* | 1236 | /* |
1230 | * Allocate a skb from the socket's receive buffer. | 1237 | * Allocate a skb from the socket's receive buffer. |
@@ -1261,6 +1268,7 @@ void *sock_kmalloc(struct sock *sk, int size, gfp_t priority) | |||
1261 | } | 1268 | } |
1262 | return NULL; | 1269 | return NULL; |
1263 | } | 1270 | } |
1271 | EXPORT_SYMBOL(sock_kmalloc); | ||
1264 | 1272 | ||
1265 | /* | 1273 | /* |
1266 | * Free an option memory block. | 1274 | * Free an option memory block. |
@@ -1270,11 +1278,12 @@ void sock_kfree_s(struct sock *sk, void *mem, int size) | |||
1270 | kfree(mem); | 1278 | kfree(mem); |
1271 | atomic_sub(size, &sk->sk_omem_alloc); | 1279 | atomic_sub(size, &sk->sk_omem_alloc); |
1272 | } | 1280 | } |
1281 | EXPORT_SYMBOL(sock_kfree_s); | ||
1273 | 1282 | ||
1274 | /* It is almost wait_for_tcp_memory minus release_sock/lock_sock. | 1283 | /* It is almost wait_for_tcp_memory minus release_sock/lock_sock. |
1275 | I think, these locks should be removed for datagram sockets. | 1284 | I think, these locks should be removed for datagram sockets. |
1276 | */ | 1285 | */ |
1277 | static long sock_wait_for_wmem(struct sock * sk, long timeo) | 1286 | static long sock_wait_for_wmem(struct sock *sk, long timeo) |
1278 | { | 1287 | { |
1279 | DEFINE_WAIT(wait); | 1288 | DEFINE_WAIT(wait); |
1280 | 1289 | ||
@@ -1392,6 +1401,7 @@ struct sk_buff *sock_alloc_send_skb(struct sock *sk, unsigned long size, | |||
1392 | { | 1401 | { |
1393 | return sock_alloc_send_pskb(sk, size, 0, noblock, errcode); | 1402 | return sock_alloc_send_pskb(sk, size, 0, noblock, errcode); |
1394 | } | 1403 | } |
1404 | EXPORT_SYMBOL(sock_alloc_send_skb); | ||
1395 | 1405 | ||
1396 | static void __lock_sock(struct sock *sk) | 1406 | static void __lock_sock(struct sock *sk) |
1397 | { | 1407 | { |
@@ -1460,7 +1470,6 @@ int sk_wait_data(struct sock *sk, long *timeo) | |||
1460 | finish_wait(sk->sk_sleep, &wait); | 1470 | finish_wait(sk->sk_sleep, &wait); |
1461 | return rc; | 1471 | return rc; |
1462 | } | 1472 | } |
1463 | |||
1464 | EXPORT_SYMBOL(sk_wait_data); | 1473 | EXPORT_SYMBOL(sk_wait_data); |
1465 | 1474 | ||
1466 | /** | 1475 | /** |
@@ -1541,7 +1550,6 @@ suppress_allocation: | |||
1541 | atomic_sub(amt, prot->memory_allocated); | 1550 | atomic_sub(amt, prot->memory_allocated); |
1542 | return 0; | 1551 | return 0; |
1543 | } | 1552 | } |
1544 | |||
1545 | EXPORT_SYMBOL(__sk_mem_schedule); | 1553 | EXPORT_SYMBOL(__sk_mem_schedule); |
1546 | 1554 | ||
1547 | /** | 1555 | /** |
@@ -1560,7 +1568,6 @@ void __sk_mem_reclaim(struct sock *sk) | |||
1560 | (atomic_read(prot->memory_allocated) < prot->sysctl_mem[0])) | 1568 | (atomic_read(prot->memory_allocated) < prot->sysctl_mem[0])) |
1561 | *prot->memory_pressure = 0; | 1569 | *prot->memory_pressure = 0; |
1562 | } | 1570 | } |
1563 | |||
1564 | EXPORT_SYMBOL(__sk_mem_reclaim); | 1571 | EXPORT_SYMBOL(__sk_mem_reclaim); |
1565 | 1572 | ||
1566 | 1573 | ||
@@ -1575,78 +1582,92 @@ int sock_no_bind(struct socket *sock, struct sockaddr *saddr, int len) | |||
1575 | { | 1582 | { |
1576 | return -EOPNOTSUPP; | 1583 | return -EOPNOTSUPP; |
1577 | } | 1584 | } |
1585 | EXPORT_SYMBOL(sock_no_bind); | ||
1578 | 1586 | ||
1579 | int sock_no_connect(struct socket *sock, struct sockaddr *saddr, | 1587 | int sock_no_connect(struct socket *sock, struct sockaddr *saddr, |
1580 | int len, int flags) | 1588 | int len, int flags) |
1581 | { | 1589 | { |
1582 | return -EOPNOTSUPP; | 1590 | return -EOPNOTSUPP; |
1583 | } | 1591 | } |
1592 | EXPORT_SYMBOL(sock_no_connect); | ||
1584 | 1593 | ||
1585 | int sock_no_socketpair(struct socket *sock1, struct socket *sock2) | 1594 | int sock_no_socketpair(struct socket *sock1, struct socket *sock2) |
1586 | { | 1595 | { |
1587 | return -EOPNOTSUPP; | 1596 | return -EOPNOTSUPP; |
1588 | } | 1597 | } |
1598 | EXPORT_SYMBOL(sock_no_socketpair); | ||
1589 | 1599 | ||
1590 | int sock_no_accept(struct socket *sock, struct socket *newsock, int flags) | 1600 | int sock_no_accept(struct socket *sock, struct socket *newsock, int flags) |
1591 | { | 1601 | { |
1592 | return -EOPNOTSUPP; | 1602 | return -EOPNOTSUPP; |
1593 | } | 1603 | } |
1604 | EXPORT_SYMBOL(sock_no_accept); | ||
1594 | 1605 | ||
1595 | int sock_no_getname(struct socket *sock, struct sockaddr *saddr, | 1606 | int sock_no_getname(struct socket *sock, struct sockaddr *saddr, |
1596 | int *len, int peer) | 1607 | int *len, int peer) |
1597 | { | 1608 | { |
1598 | return -EOPNOTSUPP; | 1609 | return -EOPNOTSUPP; |
1599 | } | 1610 | } |
1611 | EXPORT_SYMBOL(sock_no_getname); | ||
1600 | 1612 | ||
1601 | unsigned int sock_no_poll(struct file * file, struct socket *sock, poll_table *pt) | 1613 | unsigned int sock_no_poll(struct file *file, struct socket *sock, poll_table *pt) |
1602 | { | 1614 | { |
1603 | return 0; | 1615 | return 0; |
1604 | } | 1616 | } |
1617 | EXPORT_SYMBOL(sock_no_poll); | ||
1605 | 1618 | ||
1606 | int sock_no_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | 1619 | int sock_no_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) |
1607 | { | 1620 | { |
1608 | return -EOPNOTSUPP; | 1621 | return -EOPNOTSUPP; |
1609 | } | 1622 | } |
1623 | EXPORT_SYMBOL(sock_no_ioctl); | ||
1610 | 1624 | ||
1611 | int sock_no_listen(struct socket *sock, int backlog) | 1625 | int sock_no_listen(struct socket *sock, int backlog) |
1612 | { | 1626 | { |
1613 | return -EOPNOTSUPP; | 1627 | return -EOPNOTSUPP; |
1614 | } | 1628 | } |
1629 | EXPORT_SYMBOL(sock_no_listen); | ||
1615 | 1630 | ||
1616 | int sock_no_shutdown(struct socket *sock, int how) | 1631 | int sock_no_shutdown(struct socket *sock, int how) |
1617 | { | 1632 | { |
1618 | return -EOPNOTSUPP; | 1633 | return -EOPNOTSUPP; |
1619 | } | 1634 | } |
1635 | EXPORT_SYMBOL(sock_no_shutdown); | ||
1620 | 1636 | ||
1621 | int sock_no_setsockopt(struct socket *sock, int level, int optname, | 1637 | int sock_no_setsockopt(struct socket *sock, int level, int optname, |
1622 | char __user *optval, int optlen) | 1638 | char __user *optval, int optlen) |
1623 | { | 1639 | { |
1624 | return -EOPNOTSUPP; | 1640 | return -EOPNOTSUPP; |
1625 | } | 1641 | } |
1642 | EXPORT_SYMBOL(sock_no_setsockopt); | ||
1626 | 1643 | ||
1627 | int sock_no_getsockopt(struct socket *sock, int level, int optname, | 1644 | int sock_no_getsockopt(struct socket *sock, int level, int optname, |
1628 | char __user *optval, int __user *optlen) | 1645 | char __user *optval, int __user *optlen) |
1629 | { | 1646 | { |
1630 | return -EOPNOTSUPP; | 1647 | return -EOPNOTSUPP; |
1631 | } | 1648 | } |
1649 | EXPORT_SYMBOL(sock_no_getsockopt); | ||
1632 | 1650 | ||
1633 | int sock_no_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, | 1651 | int sock_no_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, |
1634 | size_t len) | 1652 | size_t len) |
1635 | { | 1653 | { |
1636 | return -EOPNOTSUPP; | 1654 | return -EOPNOTSUPP; |
1637 | } | 1655 | } |
1656 | EXPORT_SYMBOL(sock_no_sendmsg); | ||
1638 | 1657 | ||
1639 | int sock_no_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, | 1658 | int sock_no_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, |
1640 | size_t len, int flags) | 1659 | size_t len, int flags) |
1641 | { | 1660 | { |
1642 | return -EOPNOTSUPP; | 1661 | return -EOPNOTSUPP; |
1643 | } | 1662 | } |
1663 | EXPORT_SYMBOL(sock_no_recvmsg); | ||
1644 | 1664 | ||
1645 | int sock_no_mmap(struct file *file, struct socket *sock, struct vm_area_struct *vma) | 1665 | int sock_no_mmap(struct file *file, struct socket *sock, struct vm_area_struct *vma) |
1646 | { | 1666 | { |
1647 | /* Mirror missing mmap method error code */ | 1667 | /* Mirror missing mmap method error code */ |
1648 | return -ENODEV; | 1668 | return -ENODEV; |
1649 | } | 1669 | } |
1670 | EXPORT_SYMBOL(sock_no_mmap); | ||
1650 | 1671 | ||
1651 | ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags) | 1672 | ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags) |
1652 | { | 1673 | { |
@@ -1660,6 +1681,7 @@ ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset, siz | |||
1660 | kunmap(page); | 1681 | kunmap(page); |
1661 | return res; | 1682 | return res; |
1662 | } | 1683 | } |
1684 | EXPORT_SYMBOL(sock_no_sendpage); | ||
1663 | 1685 | ||
1664 | /* | 1686 | /* |
1665 | * Default Socket Callbacks | 1687 | * Default Socket Callbacks |
@@ -1723,6 +1745,7 @@ void sk_send_sigurg(struct sock *sk) | |||
1723 | if (send_sigurg(&sk->sk_socket->file->f_owner)) | 1745 | if (send_sigurg(&sk->sk_socket->file->f_owner)) |
1724 | sk_wake_async(sk, SOCK_WAKE_URG, POLL_PRI); | 1746 | sk_wake_async(sk, SOCK_WAKE_URG, POLL_PRI); |
1725 | } | 1747 | } |
1748 | EXPORT_SYMBOL(sk_send_sigurg); | ||
1726 | 1749 | ||
1727 | void sk_reset_timer(struct sock *sk, struct timer_list* timer, | 1750 | void sk_reset_timer(struct sock *sk, struct timer_list* timer, |
1728 | unsigned long expires) | 1751 | unsigned long expires) |
@@ -1730,7 +1753,6 @@ void sk_reset_timer(struct sock *sk, struct timer_list* timer, | |||
1730 | if (!mod_timer(timer, expires)) | 1753 | if (!mod_timer(timer, expires)) |
1731 | sock_hold(sk); | 1754 | sock_hold(sk); |
1732 | } | 1755 | } |
1733 | |||
1734 | EXPORT_SYMBOL(sk_reset_timer); | 1756 | EXPORT_SYMBOL(sk_reset_timer); |
1735 | 1757 | ||
1736 | void sk_stop_timer(struct sock *sk, struct timer_list* timer) | 1758 | void sk_stop_timer(struct sock *sk, struct timer_list* timer) |
@@ -1738,7 +1760,6 @@ void sk_stop_timer(struct sock *sk, struct timer_list* timer) | |||
1738 | if (timer_pending(timer) && del_timer(timer)) | 1760 | if (timer_pending(timer) && del_timer(timer)) |
1739 | __sock_put(sk); | 1761 | __sock_put(sk); |
1740 | } | 1762 | } |
1741 | |||
1742 | EXPORT_SYMBOL(sk_stop_timer); | 1763 | EXPORT_SYMBOL(sk_stop_timer); |
1743 | 1764 | ||
1744 | void sock_init_data(struct socket *sock, struct sock *sk) | 1765 | void sock_init_data(struct socket *sock, struct sock *sk) |
@@ -1797,6 +1818,7 @@ void sock_init_data(struct socket *sock, struct sock *sk) | |||
1797 | atomic_set(&sk->sk_refcnt, 1); | 1818 | atomic_set(&sk->sk_refcnt, 1); |
1798 | atomic_set(&sk->sk_drops, 0); | 1819 | atomic_set(&sk->sk_drops, 0); |
1799 | } | 1820 | } |
1821 | EXPORT_SYMBOL(sock_init_data); | ||
1800 | 1822 | ||
1801 | void lock_sock_nested(struct sock *sk, int subclass) | 1823 | void lock_sock_nested(struct sock *sk, int subclass) |
1802 | { | 1824 | { |
@@ -1812,7 +1834,6 @@ void lock_sock_nested(struct sock *sk, int subclass) | |||
1812 | mutex_acquire(&sk->sk_lock.dep_map, subclass, 0, _RET_IP_); | 1834 | mutex_acquire(&sk->sk_lock.dep_map, subclass, 0, _RET_IP_); |
1813 | local_bh_enable(); | 1835 | local_bh_enable(); |
1814 | } | 1836 | } |
1815 | |||
1816 | EXPORT_SYMBOL(lock_sock_nested); | 1837 | EXPORT_SYMBOL(lock_sock_nested); |
1817 | 1838 | ||
1818 | void release_sock(struct sock *sk) | 1839 | void release_sock(struct sock *sk) |
@@ -1895,7 +1916,6 @@ int sock_common_getsockopt(struct socket *sock, int level, int optname, | |||
1895 | 1916 | ||
1896 | return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); | 1917 | return sk->sk_prot->getsockopt(sk, level, optname, optval, optlen); |
1897 | } | 1918 | } |
1898 | |||
1899 | EXPORT_SYMBOL(sock_common_getsockopt); | 1919 | EXPORT_SYMBOL(sock_common_getsockopt); |
1900 | 1920 | ||
1901 | #ifdef CONFIG_COMPAT | 1921 | #ifdef CONFIG_COMPAT |
@@ -1925,7 +1945,6 @@ int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1925 | msg->msg_namelen = addr_len; | 1945 | msg->msg_namelen = addr_len; |
1926 | return err; | 1946 | return err; |
1927 | } | 1947 | } |
1928 | |||
1929 | EXPORT_SYMBOL(sock_common_recvmsg); | 1948 | EXPORT_SYMBOL(sock_common_recvmsg); |
1930 | 1949 | ||
1931 | /* | 1950 | /* |
@@ -1938,7 +1957,6 @@ int sock_common_setsockopt(struct socket *sock, int level, int optname, | |||
1938 | 1957 | ||
1939 | return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); | 1958 | return sk->sk_prot->setsockopt(sk, level, optname, optval, optlen); |
1940 | } | 1959 | } |
1941 | |||
1942 | EXPORT_SYMBOL(sock_common_setsockopt); | 1960 | EXPORT_SYMBOL(sock_common_setsockopt); |
1943 | 1961 | ||
1944 | #ifdef CONFIG_COMPAT | 1962 | #ifdef CONFIG_COMPAT |
@@ -1989,7 +2007,6 @@ void sk_common_release(struct sock *sk) | |||
1989 | sk_refcnt_debug_release(sk); | 2007 | sk_refcnt_debug_release(sk); |
1990 | sock_put(sk); | 2008 | sock_put(sk); |
1991 | } | 2009 | } |
1992 | |||
1993 | EXPORT_SYMBOL(sk_common_release); | 2010 | EXPORT_SYMBOL(sk_common_release); |
1994 | 2011 | ||
1995 | static DEFINE_RWLOCK(proto_list_lock); | 2012 | static DEFINE_RWLOCK(proto_list_lock); |
@@ -2171,7 +2188,6 @@ out_free_sock_slab: | |||
2171 | out: | 2188 | out: |
2172 | return -ENOBUFS; | 2189 | return -ENOBUFS; |
2173 | } | 2190 | } |
2174 | |||
2175 | EXPORT_SYMBOL(proto_register); | 2191 | EXPORT_SYMBOL(proto_register); |
2176 | 2192 | ||
2177 | void proto_unregister(struct proto *prot) | 2193 | void proto_unregister(struct proto *prot) |
@@ -2198,7 +2214,6 @@ void proto_unregister(struct proto *prot) | |||
2198 | prot->twsk_prot->twsk_slab = NULL; | 2214 | prot->twsk_prot->twsk_slab = NULL; |
2199 | } | 2215 | } |
2200 | } | 2216 | } |
2201 | |||
2202 | EXPORT_SYMBOL(proto_unregister); | 2217 | EXPORT_SYMBOL(proto_unregister); |
2203 | 2218 | ||
2204 | #ifdef CONFIG_PROC_FS | 2219 | #ifdef CONFIG_PROC_FS |
@@ -2324,33 +2339,3 @@ static int __init proto_init(void) | |||
2324 | subsys_initcall(proto_init); | 2339 | subsys_initcall(proto_init); |
2325 | 2340 | ||
2326 | #endif /* PROC_FS */ | 2341 | #endif /* PROC_FS */ |
2327 | |||
2328 | EXPORT_SYMBOL(sk_alloc); | ||
2329 | EXPORT_SYMBOL(sk_free); | ||
2330 | EXPORT_SYMBOL(sk_send_sigurg); | ||
2331 | EXPORT_SYMBOL(sock_alloc_send_skb); | ||
2332 | EXPORT_SYMBOL(sock_init_data); | ||
2333 | EXPORT_SYMBOL(sock_kfree_s); | ||
2334 | EXPORT_SYMBOL(sock_kmalloc); | ||
2335 | EXPORT_SYMBOL(sock_no_accept); | ||
2336 | EXPORT_SYMBOL(sock_no_bind); | ||
2337 | EXPORT_SYMBOL(sock_no_connect); | ||
2338 | EXPORT_SYMBOL(sock_no_getname); | ||
2339 | EXPORT_SYMBOL(sock_no_getsockopt); | ||
2340 | EXPORT_SYMBOL(sock_no_ioctl); | ||
2341 | EXPORT_SYMBOL(sock_no_listen); | ||
2342 | EXPORT_SYMBOL(sock_no_mmap); | ||
2343 | EXPORT_SYMBOL(sock_no_poll); | ||
2344 | EXPORT_SYMBOL(sock_no_recvmsg); | ||
2345 | EXPORT_SYMBOL(sock_no_sendmsg); | ||
2346 | EXPORT_SYMBOL(sock_no_sendpage); | ||
2347 | EXPORT_SYMBOL(sock_no_setsockopt); | ||
2348 | EXPORT_SYMBOL(sock_no_shutdown); | ||
2349 | EXPORT_SYMBOL(sock_no_socketpair); | ||
2350 | EXPORT_SYMBOL(sock_rfree); | ||
2351 | EXPORT_SYMBOL(sock_setsockopt); | ||
2352 | EXPORT_SYMBOL(sock_wfree); | ||
2353 | EXPORT_SYMBOL(sock_wmalloc); | ||
2354 | EXPORT_SYMBOL(sock_i_uid); | ||
2355 | EXPORT_SYMBOL(sock_i_ino); | ||
2356 | EXPORT_SYMBOL(sysctl_optmem_max); | ||