mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 14:52:34 +00:00
ipv4: ipmr: remove net pointer from struct mfc_cache
Now that cache entries in unres_queue don't need to be distinguished by their network namespace pointer anymore, we can remove it from struct mfc_cache add pass the namespace as function argument to the functions that need it. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e258beb22f
commit
d658f8a0e6
2 changed files with 32 additions and 48 deletions
|
@ -192,9 +192,6 @@ struct vif_device {
|
|||
|
||||
struct mfc_cache {
|
||||
struct mfc_cache *next; /* Next entry on cache line */
|
||||
#ifdef CONFIG_NET_NS
|
||||
struct net *mfc_net;
|
||||
#endif
|
||||
__be32 mfc_mcastgrp; /* Group the entry belongs to */
|
||||
__be32 mfc_origin; /* Source of packet */
|
||||
vifi_t mfc_parent; /* Source interface */
|
||||
|
@ -217,18 +214,6 @@ struct mfc_cache {
|
|||
} mfc_un;
|
||||
};
|
||||
|
||||
static inline
|
||||
struct net *mfc_net(const struct mfc_cache *mfc)
|
||||
{
|
||||
return read_pnet(&mfc->mfc_net);
|
||||
}
|
||||
|
||||
static inline
|
||||
void mfc_net_set(struct mfc_cache *mfc, struct net *net)
|
||||
{
|
||||
write_pnet(&mfc->mfc_net, hold_net(net));
|
||||
}
|
||||
|
||||
#define MFC_STATIC 1
|
||||
#define MFC_NOTIFY 2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue