Linux 3.10 compat: Do not rely on struct proc_dir_entry definition

Linux kernel commit torvalds/linux#59d8053f moved the definition of
struct proc_dir_entry from include/linux/proc_fs.h to the private
header fs/proc/internal.h. The SPL relied on that to map Solaris'
kstat to entries in /proc/spl/kstat.

Since the proc_dir_entry structure is now private the only safe
thing to do is wrap the opaque proc handle with our own structure.
This actually ends up simplify the code and is good because it
moves us away from depending on implementation details of /proc.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #257
This commit is contained in:
Richard Yao
2013-07-03 16:34:52 -04:00
committed by Brian Behlendorf
parent 79a7ab2581
commit f2a745c41d
4 changed files with 95 additions and 88 deletions
-3
View File
@@ -43,9 +43,6 @@
#endif
extern struct proc_dir_entry *proc_spl_kstat;
struct proc_dir_entry *proc_dir_entry_find(struct proc_dir_entry *root,
const char *str);
int proc_dir_entries(struct proc_dir_entry *root);
int spl_proc_init(void);
void spl_proc_fini(void);