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