From 4a520d2769beb736ba2bd084b8293ce148a1a7ae Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 12 Apr 2013 14:06:01 +0100 Subject: proc: Supply an accessor for getting the data from a PDE's parent Supply an accessor function for getting the private data from the parent proc_dir_entry struct of the proc_dir_entry struct associated with an inode. ReiserFS, for instance, stores the super_block pointer in the proc directory it makes for that super_block, and a pointer to the respective seq_file show function in each of the proc files in that directory. This allows a reduction in the number of file_operations structs, open functions and seq_operations structs required. The problem otherwise is that each show function requires two pieces of data but only has storage for one per PDE (and this has no release function). Signed-off-by: David Howells Acked-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman cc: Jerry Chuang cc: Maxim Mikityanskiy cc: YAMANE Toshiaki cc: linux-wireless@vger.kernel.org cc: linux-scsi@vger.kernel.org cc: devel@driverdev.osuosl.org Signed-off-by: Al Viro --- include/linux/proc_fs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index a0fb1c2f1d8e..bae820742341 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -86,6 +86,7 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, extern void proc_set_size(struct proc_dir_entry *, loff_t); extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); +extern void *proc_get_parent_data(const struct inode *); #else static inline void proc_flush_task(struct task_struct *task) -- cgit v1.2.3