From a39aca678a0626941aa99c18c1c452ca758e7865 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 24 May 2019 09:03:38 -0700 Subject: 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 Signed-off-by: David S. Miller --- include/net/inet_frag.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/net/inet_frag.h') 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); } -- cgit v1.2.3-59-g8ed1b