summaryrefslogtreecommitdiffstats
path: root/include/linux/net.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2019-07-05 20:14:16 +0100
committerDavid S. Miller <davem@davemloft.net>2019-07-08 19:25:19 -0700
commit333f7909a8573145811c4ab7d8c9092301707721 (patch)
tree313fbf52f203f67375d0d378198a70a4de732a93 /include/linux/net.h
parent6d7855c54e1e269275d7c504f8f62a0b7a5b3f18 (diff)
downloadlinux-333f7909a8573145811c4ab7d8c9092301707721.tar.bz2
coallocate socket_wq with socket itself
socket->wq is assign-once, set when we are initializing both struct socket it's in and struct socket_wq it points to. As the matter of fact, the only reason for separate allocation was the ability to RCU-delay freeing of socket_wq. RCU-delaying the freeing of socket itself gets rid of that need, so we can just fold struct socket_wq into the end of struct socket and simplify the life both for sock_alloc_inode() (one allocation instead of two) and for tun/tap oddballs, where we used to embed struct socket and struct socket_wq into the same structure (now - embedding just the struct socket). Note that reference to struct socket_wq in struct sock does remain a reference - that's unchanged. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/net.h')
-rw-r--r--include/linux/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/net.h b/include/linux/net.h
index f7d672cf25b5..9cafb5f353a9 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -116,11 +116,11 @@ struct socket {
unsigned long flags;
- struct socket_wq *wq;
-
struct file *file;
struct sock *sk;
const struct proto_ops *ops;
+
+ struct socket_wq wq;
};
struct vm_area_struct;