Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346301
b: refs/heads/master
c: d727abc
h: refs/heads/master
i:
  346299: d5c601c
v: v3
  • Loading branch information
Eric W. Biederman committed Nov 19, 2012
1 parent 7535604 commit cdb658b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 499dcf2024092e5cce41d05599a5b51d1f92031a
refs/heads/master: d727abcb2355566a3372ee1810f156fba75112b7
15 changes: 9 additions & 6 deletions trunk/include/net/net_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,19 @@ struct net {
/* Init's network namespace */
extern struct net init_net;

#ifdef CONFIG_NET
#ifdef CONFIG_NET_NS
extern struct net *copy_net_ns(unsigned long flags, struct net *net_ns);

#else /* CONFIG_NET */
static inline struct net *copy_net_ns(unsigned long flags, struct net *net_ns)
#else /* CONFIG_NET_NS */
#include <linux/sched.h>
#include <linux/nsproxy.h>
static inline struct net *copy_net_ns(unsigned long flags, struct net *old_net)
{
/* There is nothing to copy so this is a noop */
return net_ns;
if (flags & CLONE_NEWNET)
return ERR_PTR(-EINVAL);
return old_net;
}
#endif /* CONFIG_NET */
#endif /* CONFIG_NET_NS */


extern struct list_head net_namespace_list;
Expand Down
7 changes: 0 additions & 7 deletions trunk/net/core/net_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,6 @@ struct net *get_net_ns_by_fd(int fd)
}

#else
struct net *copy_net_ns(unsigned long flags, struct net *old_net)
{
if (flags & CLONE_NEWNET)
return ERR_PTR(-EINVAL);
return old_net;
}

struct net *get_net_ns_by_fd(int fd)
{
return ERR_PTR(-EINVAL);
Expand Down

0 comments on commit cdb658b

Please sign in to comment.