From 7cc05662682da4b0e0a4fdf3c3f190577803ae81 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 28 Jan 2015 18:04:53 +0100 Subject: net: remove sock_iocb The sock_iocb structure is allocate on stack for each read/write-like operation on sockets, and contains various fields of which only the embedded msghdr and sometimes a pointer to the scm_cookie is ever used. Get rid of the sock_iocb and put a msghdr directly on the stack and pass the scm_cookie explicitly to netlink_mmap_sendmsg. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller --- include/net/sock.h | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'include/net') diff --git a/include/net/sock.h b/include/net/sock.h index 2210fec65669..15341499786c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1374,29 +1374,6 @@ void sk_prot_clear_portaddr_nulls(struct sock *sk, int size); #define SOCK_BINDADDR_LOCK 4 #define SOCK_BINDPORT_LOCK 8 -/* sock_iocb: used to kick off async processing of socket ios */ -struct sock_iocb { - struct list_head list; - - int flags; - int size; - struct socket *sock; - struct sock *sk; - struct scm_cookie *scm; - struct msghdr *msg, async_msg; - struct kiocb *kiocb; -}; - -static inline struct sock_iocb *kiocb_to_siocb(struct kiocb *iocb) -{ - return (struct sock_iocb *)iocb->private; -} - -static inline struct kiocb *siocb_to_kiocb(struct sock_iocb *si) -{ - return si->kiocb; -} - struct socket_alloc { struct socket socket; struct inode vfs_inode; -- cgit v1.2.3