@@ -33,10 +33,11 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde)
return pde->parent->data;
}
-static struct net *get_proc_net(const struct inode *inode)
+struct net *get_proc_net(const struct inode *inode)
{
return maybe_get_net(PDE_NET(PDE(inode)));
}
+EXPORT_SYMBOL_GPL(get_proc_net);
int seq_open_net(struct inode *ino, struct file *f,
const struct seq_operations *ops, int size)
@@ -79,6 +79,8 @@ static inline struct proc_dir_entry *proc_net_mkdir(
return proc_mkdir_data(name, 0, parent, net);
}
+extern struct net *get_proc_net(const struct inode *inode);
+
struct ns_common;
int open_related_ns(struct ns_common *ns,
struct ns_common *(*get_ns)(struct ns_common *ns));
Export get_proc_net() so that write() routines attached to net-namespaced proc files can find the network namespace that they're in. Currently, this is only accessible via seqfile routines. This will permit AFS to have a separate cell database per-network namespace and to manage each one independently of the others. Signed-off-by: David Howells <dhowells@redhat.com> --- fs/proc/proc_net.c | 3 ++- include/linux/proc_fs.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html