aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/net_namespace.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 80e271d9e64b..f97652036754 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -10,7 +10,8 @@
10#include <linux/idr.h> 10#include <linux/idr.h>
11#include <linux/rculist.h> 11#include <linux/rculist.h>
12#include <linux/nsproxy.h> 12#include <linux/nsproxy.h>
13#include <linux/proc_fs.h> 13#include <linux/fs.h>
14#include <linux/proc_ns.h>
14#include <linux/file.h> 15#include <linux/file.h>
15#include <linux/export.h> 16#include <linux/export.h>
16#include <linux/user_namespace.h> 17#include <linux/user_namespace.h>
@@ -336,7 +337,7 @@ EXPORT_SYMBOL_GPL(__put_net);
336 337
337struct net *get_net_ns_by_fd(int fd) 338struct net *get_net_ns_by_fd(int fd)
338{ 339{
339 struct proc_inode *ei; 340 struct proc_ns *ei;
340 struct file *file; 341 struct file *file;
341 struct net *net; 342 struct net *net;
342 343
@@ -344,7 +345,7 @@ struct net *get_net_ns_by_fd(int fd)
344 if (IS_ERR(file)) 345 if (IS_ERR(file))
345 return ERR_CAST(file); 346 return ERR_CAST(file);
346 347
347 ei = PROC_I(file_inode(file)); 348 ei = get_proc_ns(file_inode(file));
348 if (ei->ns_ops == &netns_operations) 349 if (ei->ns_ops == &netns_operations)
349 net = get_net(ei->ns); 350 net = get_net(ei->ns);
350 else 351 else