diff options
author | Eric Dumazet <edumazet@google.com> | 2019-05-24 19:03:38 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-27 00:08:05 +0300 |
commit | a39aca678a0626941aa99c18c1c452ca758e7865 (patch) | |
tree | f7b16eb9d746b1afe0b8b70c78c5bc197aef0ca4 /include | |
parent | 9cce45f22ceedf639cbb5fb5dfe612a278d36b58 (diff) | |
download | linux-a39aca678a0626941aa99c18c1c452ca758e7865.tar.xz |
net: add a net pointer to struct fqdir
fqdir will soon be dynamically allocated.
We need to reach the struct net pointer from fqdir,
so add it, and replace the various container_of() constructs
by direct access to the new field.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/inet_frag.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/inet_frag.h b/include/net/inet_frag.h index fca246b0abd8..37cde5c1498c 100644 --- a/include/net/inet_frag.h +++ b/include/net/inet_frag.h @@ -12,6 +12,7 @@ struct fqdir { int timeout; int max_dist; struct inet_frags *f; + struct net *net; struct rhashtable rhashtable ____cacheline_aligned_in_smp; @@ -104,9 +105,11 @@ struct inet_frags { int inet_frags_init(struct inet_frags *); void inet_frags_fini(struct inet_frags *); -static inline int fqdir_init(struct fqdir *fqdir, struct inet_frags *f) +static inline int fqdir_init(struct fqdir *fqdir, struct inet_frags *f, + struct net *net) { fqdir->f = f; + fqdir->net = net; atomic_long_set(&fqdir->mem, 0); return rhashtable_init(&fqdir->rhashtable, &fqdir->f->rhash_params); } |