lib: introduce common method to convert hex digits
[safe/jmp/linux-2.6] / include / linux / net.h
index 5e8083c..2b4deee 100644 (file)
@@ -59,6 +59,7 @@ typedef enum {
 #include <linux/wait.h>
 #include <linux/fcntl.h>       /* For O_CLOEXEC and O_NONBLOCK */
 #include <linux/kmemcheck.h>
+#include <linux/rcupdate.h>
 
 struct poll_table_struct;
 struct pipe_inode_info;
@@ -116,6 +117,12 @@ enum sock_shutdown_cmd {
        SHUT_RDWR       = 2,
 };
 
+struct socket_wq {
+       wait_queue_head_t       wait;
+       struct fasync_struct    *fasync_list;
+       struct rcu_head         rcu;
+} ____cacheline_aligned_in_smp;
+
 /**
  *  struct socket - general BSD socket
  *  @state: socket state (%SS_CONNECTED, etc)
@@ -135,11 +142,8 @@ struct socket {
        kmemcheck_bitfield_end(type);
 
        unsigned long           flags;
-       /*
-        * Please keep fasync_list & wait fields in the same cache line
-        */
-       struct fasync_struct    *fasync_list;
-       wait_queue_head_t       wait;
+
+       struct socket_wq        *wq;
 
        struct file             *file;
        struct sock             *sk;
@@ -174,18 +178,22 @@ struct proto_ops {
                                      struct poll_table_struct *wait);
        int             (*ioctl)     (struct socket *sock, unsigned int cmd,
                                      unsigned long arg);
+#ifdef CONFIG_COMPAT
        int             (*compat_ioctl) (struct socket *sock, unsigned int cmd,
                                      unsigned long arg);
+#endif
        int             (*listen)    (struct socket *sock, int len);
        int             (*shutdown)  (struct socket *sock, int flags);
        int             (*setsockopt)(struct socket *sock, int level,
                                      int optname, char __user *optval, unsigned int optlen);
        int             (*getsockopt)(struct socket *sock, int level,
                                      int optname, char __user *optval, int __user *optlen);
+#ifdef CONFIG_COMPAT
        int             (*compat_setsockopt)(struct socket *sock, int level,
                                      int optname, char __user *optval, unsigned int optlen);
        int             (*compat_getsockopt)(struct socket *sock, int level,
                                      int optname, char __user *optval, int __user *optlen);
+#endif
        int             (*sendmsg)   (struct kiocb *iocb, struct socket *sock,
                                      struct msghdr *m, size_t total_len);
        int             (*recvmsg)   (struct kiocb *iocb, struct socket *sock,