summaryrefslogtreecommitdiffstats
path: root/include/net/inet_frag.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-05-24 09:03:38 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-26 14:08:05 -0700
commita39aca678a0626941aa99c18c1c452ca758e7865 (patch)
treef7b16eb9d746b1afe0b8b70c78c5bc197aef0ca4 /include/net/inet_frag.h
parent9cce45f22ceedf639cbb5fb5dfe612a278d36b58 (diff)
downloadlinux-a39aca678a0626941aa99c18c1c452ca758e7865.tar.bz2
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/net/inet_frag.h')
-rw-r--r--include/net/inet_frag.h5
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);
}