diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-07-05 15:13:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-08 22:25:19 -0400 |
commit | 6d7855c54e1e269275d7c504f8f62a0b7a5b3f18 (patch) | |
tree | ea317c2fdec3842d1af4d8651b31c0a429f83cb2 /net/socket.c | |
parent | 17ccf9e31e0d650b36fdc06eb7b09757523111c7 (diff) |
sockfs: switch to ->free_inode()
we do have an RCU-delayed part there already (freeing the wq),
so it's not like the pipe situation; moreover, it might be
worth considering coallocating wq with the rest of struct sock_alloc.
->sk_wq in struct sock would remain a pointer as it is, but
the object it normally points to would be coallocated with
struct socket...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c index d97b74f762e8..541719a2443d 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -258,12 +258,12 @@ static struct inode *sock_alloc_inode(struct super_block *sb) | |||
258 | return &ei->vfs_inode; | 258 | return &ei->vfs_inode; |
259 | } | 259 | } |
260 | 260 | ||
261 | static void sock_destroy_inode(struct inode *inode) | 261 | static void sock_free_inode(struct inode *inode) |
262 | { | 262 | { |
263 | struct socket_alloc *ei; | 263 | struct socket_alloc *ei; |
264 | 264 | ||
265 | ei = container_of(inode, struct socket_alloc, vfs_inode); | 265 | ei = container_of(inode, struct socket_alloc, vfs_inode); |
266 | kfree_rcu(ei->socket.wq, rcu); | 266 | kfree(ei->socket.wq); |
267 | kmem_cache_free(sock_inode_cachep, ei); | 267 | kmem_cache_free(sock_inode_cachep, ei); |
268 | } | 268 | } |
269 | 269 | ||
@@ -288,7 +288,7 @@ static void init_inodecache(void) | |||
288 | 288 | ||
289 | static const struct super_operations sockfs_ops = { | 289 | static const struct super_operations sockfs_ops = { |
290 | .alloc_inode = sock_alloc_inode, | 290 | .alloc_inode = sock_alloc_inode, |
291 | .destroy_inode = sock_destroy_inode, | 291 | .free_inode = sock_free_inode, |
292 | .statfs = simple_statfs, | 292 | .statfs = simple_statfs, |
293 | }; | 293 | }; |
294 | 294 | ||