mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
net: ib_net pointer should depends on CONFIG_NET_NS
We can shrink size of "struct inet_bind_bucket" by 50%, using read_pnet() and write_pnet() Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8f424b5f32
commit
7a9546ee35
3 changed files with 12 additions and 5 deletions
|
@ -77,13 +77,20 @@ struct inet_ehash_bucket {
|
|||
* ports are created in O(1) time? I thought so. ;-) -DaveM
|
||||
*/
|
||||
struct inet_bind_bucket {
|
||||
#ifdef CONFIG_NET_NS
|
||||
struct net *ib_net;
|
||||
#endif
|
||||
unsigned short port;
|
||||
signed short fastreuse;
|
||||
struct hlist_node node;
|
||||
struct hlist_head owners;
|
||||
};
|
||||
|
||||
static inline struct net *ib_net(struct inet_bind_bucket *ib)
|
||||
{
|
||||
return read_pnet(&ib->ib_net);
|
||||
}
|
||||
|
||||
#define inet_bind_bucket_for_each(tb, node, head) \
|
||||
hlist_for_each_entry(tb, node, head, node)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue