diff options
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r-- | fs/sysfs/sysfs.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h index 7484a36ee678..661a9639570b 100644 --- a/fs/sysfs/sysfs.h +++ b/fs/sysfs/sysfs.h | |||
@@ -20,9 +20,8 @@ struct sysfs_elem_dir { | |||
20 | struct kobject *kobj; | 20 | struct kobject *kobj; |
21 | 21 | ||
22 | unsigned long subdirs; | 22 | unsigned long subdirs; |
23 | 23 | /* children rbtree starts here and goes through sd->s_rb */ | |
24 | struct rb_root inode_tree; | 24 | struct rb_root children; |
25 | struct rb_root name_tree; | ||
26 | }; | 25 | }; |
27 | 26 | ||
28 | struct sysfs_elem_symlink { | 27 | struct sysfs_elem_symlink { |
@@ -62,8 +61,7 @@ struct sysfs_dirent { | |||
62 | struct sysfs_dirent *s_parent; | 61 | struct sysfs_dirent *s_parent; |
63 | const char *s_name; | 62 | const char *s_name; |
64 | 63 | ||
65 | struct rb_node inode_node; | 64 | struct rb_node s_rb; |
66 | struct rb_node name_node; | ||
67 | 65 | ||
68 | union { | 66 | union { |
69 | struct completion *completion; | 67 | struct completion *completion; |
@@ -71,6 +69,7 @@ struct sysfs_dirent { | |||
71 | } u; | 69 | } u; |
72 | 70 | ||
73 | const void *s_ns; /* namespace tag */ | 71 | const void *s_ns; /* namespace tag */ |
72 | unsigned int s_hash; /* ns + name hash */ | ||
74 | union { | 73 | union { |
75 | struct sysfs_elem_dir s_dir; | 74 | struct sysfs_elem_dir s_dir; |
76 | struct sysfs_elem_symlink s_symlink; | 75 | struct sysfs_elem_symlink s_symlink; |
@@ -78,9 +77,9 @@ struct sysfs_dirent { | |||
78 | struct sysfs_elem_bin_attr s_bin_attr; | 77 | struct sysfs_elem_bin_attr s_bin_attr; |
79 | }; | 78 | }; |
80 | 79 | ||
81 | unsigned int s_flags; | 80 | unsigned short s_flags; |
82 | umode_t s_mode; | 81 | umode_t s_mode; |
83 | ino_t s_ino; | 82 | unsigned int s_ino; |
84 | struct sysfs_inode_attrs *s_iattr; | 83 | struct sysfs_inode_attrs *s_iattr; |
85 | }; | 84 | }; |
86 | 85 | ||
@@ -95,11 +94,11 @@ struct sysfs_dirent { | |||
95 | #define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR) | 94 | #define SYSFS_ACTIVE_REF (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR) |
96 | 95 | ||
97 | /* identify any namespace tag on sysfs_dirents */ | 96 | /* identify any namespace tag on sysfs_dirents */ |
98 | #define SYSFS_NS_TYPE_MASK 0xff00 | 97 | #define SYSFS_NS_TYPE_MASK 0xf00 |
99 | #define SYSFS_NS_TYPE_SHIFT 8 | 98 | #define SYSFS_NS_TYPE_SHIFT 8 |
100 | 99 | ||
101 | #define SYSFS_FLAG_MASK ~(SYSFS_NS_TYPE_MASK|SYSFS_TYPE_MASK) | 100 | #define SYSFS_FLAG_MASK ~(SYSFS_NS_TYPE_MASK|SYSFS_TYPE_MASK) |
102 | #define SYSFS_FLAG_REMOVED 0x020000 | 101 | #define SYSFS_FLAG_REMOVED 0x02000 |
103 | 102 | ||
104 | static inline unsigned int sysfs_type(struct sysfs_dirent *sd) | 103 | static inline unsigned int sysfs_type(struct sysfs_dirent *sd) |
105 | { | 104 | { |