summaryrefslogtreecommitdiffstats
path: root/include/linux/kernfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-12-11 14:11:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-11 18:43:48 -0500
commitadc5e8b58f4886d45f79f4ff41a09001a76a6b12 (patch)
treee77d7c1cb4c7b9fcf236b329cb486750dbaef860 /include/linux/kernfs.h
parent324a56e16e44baecac3ca799fd216154145c14bf (diff)
kernfs: drop s_ prefix from kernfs_node members
kernfs has just been separated out from sysfs and we're already in full conflict mode. Nothing can make the situation any worse. Let's take the chance to name things properly. s_ prefix for kernfs members is used inconsistently and a misnomer now. It's not like kernfs_node is used widely across the kernel making the ability to grep for the members particularly useful. Let's just drop the prefix. This patch is strictly rename only and doesn't introduce any functional difference. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/kernfs.h')
-rw-r--r--include/linux/kernfs.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/include/linux/kernfs.h b/include/linux/kernfs.h
index 195d1c6a8b0c..092469f60e3e 100644
--- a/include/linux/kernfs.h
+++ b/include/linux/kernfs.h
@@ -49,7 +49,7 @@ enum kernfs_node_flag {
49/* type-specific structures for kernfs_node union members */ 49/* type-specific structures for kernfs_node union members */
50struct kernfs_elem_dir { 50struct kernfs_elem_dir {
51 unsigned long subdirs; 51 unsigned long subdirs;
52 /* children rbtree starts here and goes through kn->s_rb */ 52 /* children rbtree starts here and goes through kn->rb */
53 struct rb_root children; 53 struct rb_root children;
54 54
55 /* 55 /*
@@ -79,36 +79,36 @@ struct kernfs_elem_attr {
79 * active reference. 79 * active reference.
80 */ 80 */
81struct kernfs_node { 81struct kernfs_node {
82 atomic_t s_count; 82 atomic_t count;
83 atomic_t s_active; 83 atomic_t active;
84#ifdef CONFIG_DEBUG_LOCK_ALLOC 84#ifdef CONFIG_DEBUG_LOCK_ALLOC
85 struct lockdep_map dep_map; 85 struct lockdep_map dep_map;
86#endif 86#endif
87 /* the following two fields are published */ 87 /* the following two fields are published */
88 struct kernfs_node *s_parent; 88 struct kernfs_node *parent;
89 const char *s_name; 89 const char *name;
90 90
91 struct rb_node s_rb; 91 struct rb_node rb;
92 92
93 union { 93 union {
94 struct completion *completion; 94 struct completion *completion;
95 struct kernfs_node *removed_list; 95 struct kernfs_node *removed_list;
96 } u; 96 } u;
97 97
98 const void *s_ns; /* namespace tag */ 98 const void *ns; /* namespace tag */
99 unsigned int s_hash; /* ns + name hash */ 99 unsigned int hash; /* ns + name hash */
100 union { 100 union {
101 struct kernfs_elem_dir s_dir; 101 struct kernfs_elem_dir dir;
102 struct kernfs_elem_symlink s_symlink; 102 struct kernfs_elem_symlink symlink;
103 struct kernfs_elem_attr s_attr; 103 struct kernfs_elem_attr attr;
104 }; 104 };
105 105
106 void *priv; 106 void *priv;
107 107
108 unsigned short s_flags; 108 unsigned short flags;
109 umode_t s_mode; 109 umode_t mode;
110 unsigned int s_ino; 110 unsigned int ino;
111 struct sysfs_inode_attrs *s_iattr; 111 struct sysfs_inode_attrs *iattr;
112}; 112};
113 113
114struct kernfs_root { 114struct kernfs_root {
@@ -172,7 +172,7 @@ struct kernfs_ops {
172 172
173static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn) 173static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn)
174{ 174{
175 return kn->s_flags & SYSFS_TYPE_MASK; 175 return kn->flags & SYSFS_TYPE_MASK;
176} 176}
177 177
178/** 178/**
@@ -186,8 +186,8 @@ static inline enum kernfs_node_type sysfs_type(struct kernfs_node *kn)
186static inline void kernfs_enable_ns(struct kernfs_node *kn) 186static inline void kernfs_enable_ns(struct kernfs_node *kn)
187{ 187{
188 WARN_ON_ONCE(sysfs_type(kn) != SYSFS_DIR); 188 WARN_ON_ONCE(sysfs_type(kn) != SYSFS_DIR);
189 WARN_ON_ONCE(!RB_EMPTY_ROOT(&kn->s_dir.children)); 189 WARN_ON_ONCE(!RB_EMPTY_ROOT(&kn->dir.children));
190 kn->s_flags |= SYSFS_FLAG_NS; 190 kn->flags |= SYSFS_FLAG_NS;
191} 191}
192 192
193/** 193/**
@@ -198,7 +198,7 @@ static inline void kernfs_enable_ns(struct kernfs_node *kn)
198 */ 198 */
199static inline bool kernfs_ns_enabled(struct kernfs_node *kn) 199static inline bool kernfs_ns_enabled(struct kernfs_node *kn)
200{ 200{
201 return kn->s_flags & SYSFS_FLAG_NS; 201 return kn->flags & SYSFS_FLAG_NS;
202} 202}
203 203
204struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent, 204struct kernfs_node *kernfs_find_and_get_ns(struct kernfs_node *parent,