[PATCH] proc: proc_inode pid/fd and sysctl/sysctl_entry are neverused at the same time

From: Lucian Adrian Grijincu
Date: Wed Jan 12 2011 - 05:15:27 EST


Or at least I could not find a place where both are
used at the same time.

Signed-off-by: Lucian Adrian Grijincu <lucian.grijincu@xxxxxxxxx>
---
include/linux/proc_fs.h | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 379eaed..3c287e3 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -262,12 +262,18 @@ struct ctl_table_header;
struct ctl_table;

struct proc_inode {
- struct pid *pid;
- int fd;
- union proc_op op;
+ union {
+ struct {
+ int fd;
+ struct pid *pid;
+ };
+ struct {
+ struct ctl_table_header *sysctl;
+ struct ctl_table *sysctl_entry;
+ };
+ };
struct proc_dir_entry *pde;
- struct ctl_table_header *sysctl;
- struct ctl_table *sysctl_entry;
+ union proc_op op;
struct inode vfs_inode;
};