From 3617d9496cd92dcca4d0893191d95554590d8d9f Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 13 Apr 2018 20:38:35 +0200 Subject: proc: introduce proc_create_net_single Variant of proc_create_data that directly take a seq_file show callback and deals with network namespaces in ->open and ->release. All callers of proc_create + single_open_net converted over, and single_{open,release}_net are removed entirely. Signed-off-by: Christoph Hellwig --- include/linux/proc_fs.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux/proc_fs.h') diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 9dcde9644253..e518352137e7 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -58,6 +58,9 @@ struct proc_dir_entry *proc_create_net_data(const char *name, umode_t mode, unsigned int state_size, void *data); #define proc_create_net(name, mode, parent, state_size, ops) \ proc_create_net_data(name, mode, parent, state_size, ops, NULL) +struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode, + struct proc_dir_entry *parent, + int (*show)(struct seq_file *, void *), void *data); #else /* CONFIG_PROC_FS */ @@ -97,6 +100,7 @@ static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *p #define proc_create_net_data(name, mode, parent, ops, state_size, data) ({NULL;}) #define proc_create_net(name, mode, parent, state_size, ops) ({NULL;}) +#define proc_create_net_single(name, mode, parent, show, data) ({NULL;}) #endif /* CONFIG_PROC_FS */ -- cgit v1.2.3