]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/proc_net.c
[NET]: Fix race when opening a proc file while a network namespace is exiting.
[linux-2.6-omap-h63xx.git] / fs / proc / proc_net.c
index 358930a3142af37889ea1854fa8d9ad7b89fd99e..85cc8e8bb8621392a0d49dd736a72cfd5a241c80 100644 (file)
@@ -51,6 +51,12 @@ void proc_net_remove(struct net *net, const char *name)
 }
 EXPORT_SYMBOL_GPL(proc_net_remove);
 
+struct net *get_proc_net(const struct inode *inode)
+{
+       return maybe_get_net(PDE_NET(PDE(inode)));
+}
+EXPORT_SYMBOL_GPL(get_proc_net);
+
 static struct proc_dir_entry *proc_net_shadow;
 
 static struct dentry *proc_net_shadow_dentry(struct dentry *parent,