Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121838
b: refs/heads/master
c: 8f424b5
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 12, 2008
1 parent e22eddc commit 1013b53
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9eca0a47dee201a73967026985b5f0a79a46bd36
refs/heads/master: 8f424b5f32d78b4f353b3cddca9804808ef063eb
18 changes: 18 additions & 0 deletions trunk/include/net/net_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,24 @@ static inline void release_net(struct net *net)
}
#endif

#ifdef CONFIG_NET_NS

static inline void write_pnet(struct net **pnet, struct net *net)
{
*pnet = net;
}

static inline struct net *read_pnet(struct net * const *pnet)
{
return *pnet;
}

#else

#define write_pnet(pnet, net) do { (void)(net);} while (0)
#define read_pnet(pnet) (&init_net)

#endif

#define for_each_net(VAR) \
list_for_each_entry(VAR, &net_namespace_list, list)
Expand Down

0 comments on commit 1013b53

Please sign in to comment.